Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng completion not working (Error: Cannot find module './build.d') #4664

Closed
delight opened this issue Feb 13, 2017 · 19 comments
Closed

ng completion not working (Error: Cannot find module './build.d') #4664

delight opened this issue Feb 13, 2017 · 19 comments

Comments

@delight
Copy link

delight commented Feb 13, 2017

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Ubuntu 14.04.5 LTS

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

@angular/cli: 1.0.0-beta.31
node: 6.9.5
os: linux x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

The log given by the failure.

Normally this include a stack trace and some more information.

ng completion
Cannot find module './build.d'
Error: Cannot find module './build.d'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at commandFiles.reduce (/home/use/.nvm/versions/node/v6.9.5/lib/node_modules/@angular/cli/commands/completion.js:46:33)
at Array.reduce (native)
at Class.run (/home/use/.nvm/versions/node/v6.9.5/lib/node_modules/@angular/cli/commands/completion.js:44:41)
at Class. (/home/use/.nvm/versions/node/v6.9.5/lib/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)

Mention any other details that might be useful.

all available options for ng completion (-a, -b, -z) result in the same error


Thanks! We'll be in touch soon.

@delight delight changed the title l ng completion not working (Error: Cannot find module './build.d') Feb 13, 2017
@Murazaki
Copy link

Murazaki commented Feb 13, 2017

Same error on Mac OS X Sierra 10.12.3
with @angular/cli 1.0.0-beta.31
node: 7.5.0

ng completion
Cannot find module './build.d'
Error: Cannot find module './build.d'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at commandFiles.reduce (/Users/murazaki/Dev/Web/MEAN/compo/web-angular-ts/node_modules/@angular/cli/commands/completion.js:46:33)
    at Array.reduce (native)
    at Class.run (/Users/murazaki/Dev/Web/MEAN/compo/web-angular-ts/node_modules/@angular/cli/commands/completion.js:44:41)
    at Class.<anonymous> (/Users/murazaki/Dev/Web/MEAN/compo/web-angular-ts/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

@tarlepp
Copy link

tarlepp commented Feb 18, 2017

Same error here

@angular/cli: 1.0.0-beta.32.3
node: 7.2.1
os: linux x64
wunder@Code-VirtualBox:~/projects$ ng completion -b
Cannot find module './build.d'
Error: Cannot find module './build.d'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at commandFiles.reduce (/home/wunder/.nvm/versions/node/v7.2.1/lib/node_modules/@angular/cli/commands/completion.js:54:33)
    at Array.reduce (native)
    at Class.run (/home/wunder/.nvm/versions/node/v7.2.1/lib/node_modules/@angular/cli/commands/completion.js:52:41)
    at Class.<anonymous> (/home/wunder/.nvm/versions/node/v7.2.1/lib/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

@dave11mj
Copy link
Contributor

dave11mj commented Feb 19, 2017

Same error here

macOS Sierra
Version 10.12.1
@angular/cli: 1.0.0-beta.31
node: 6.9.5
os: darwin x64
Cannot find module './build.d'
Error: Cannot find module './build.d'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    ...

@delight
Copy link
Author

delight commented Feb 20, 2017

error still present in 1.0.0-beta.32.3

@zbicin
Copy link

zbicin commented Feb 22, 2017

Same story on Windows using Git Bash (haven't checked in cmd though):

@angular/cli: 1.0.0-beta.32.3
node: 7.5.0
os: win32 x64
$ ng completion
Cannot find module './build.d'
Error: Cannot find module './build.d'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at commandFiles.reduce (xxxxx\AppData\Roaming\npm\node_modules\@angular\cli\commands\completion.js:54:33)
    at Array.reduce (native)
    at Class.run (xxxxx\AppData\Roaming\npm\node_modules\@angular\cli\commands\completion.js:52:41)
    at Class.<anonymous> (xxxxx\AppData\Roaming\npm\node_modules\@angular\cli\ember-cli\lib\models\command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

@pawmot
Copy link

pawmot commented Feb 23, 2017

Same here:

OS: Ubuntu 16.10

@angular/cli: 1.0.0-beta.32.3
node: 7.3.0
os: linux x64
Cannot find module './build.d'
Error: Cannot find module './build.d'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at commandFiles.reduce (/home/pmotyl/.nvm/versions/node/v7.3.0/lib/node_modules/@angular/cli/commands/completion.js:54:33)
    at Array.reduce (native)
    at Class.run (/home/pmotyl/.nvm/versions/node/v7.3.0/lib/node_modules/@angular/cli/commands/completion.js:52:41)
    at Class.<anonymous> (/home/pmotyl/.nvm/versions/node/v7.3.0/lib/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
    at process._tickCallback (internal/process/next_tick.js:103:7)

@d2chau
Copy link

d2chau commented Feb 24, 2017

This is also reproducible using zsh:

@angular/cli: 1.0.0-beta.32.3
node: 7.4.0
OS: OSX Sierra 10.12.3

@prijindal
Copy link

Same Here

@angular/cli: 1.0.0-beta.32.3
node: 7.5.0
os: linux x64

@Meligy
Copy link
Contributor

Meligy commented Feb 26, 2017

Getting it in rc0 on Mac Sierra:

@angular/cli: 1.0.0-rc.0
node: 6.9.1
os: darwin x64

Installed globally via Yarn, if at all relevant.

@ovitrif
Copy link

ovitrif commented Mar 1, 2017

Getting it in Ubuntu 16.04 x64
@angular/cli: 1.0.0-rc.0

@alexanderwende
Copy link

Same on MacOS Sierra 10.12.3:

@angular/cli: 1.0.0-rc.0
node: 7.6.0
os: darwin x64

Cannot find module './build.d'
Error: Cannot find module './build.d'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at commandFiles.reduce (/Users/alex/.config/yarn/global/node_modules/@angular/cli/commands/completion.js:72:33)
at Array.reduce (native)
at Class.run (/Users/alex/.config/yarn/global/node_modules/@angular/cli/commands/completion.js:70:41)
at Class. (/Users/alex/.config/yarn/global/node_modules/@angular/cli/ember-cli/lib/models/command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)

@doxasoft
Copy link

doxasoft commented Mar 2, 2017

Same on Mac El Capitan

@angular/cli: 1.0.0-beta.31
node: 6.9.5
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.31
@angular/compiler-cli: 2.4.7

@filipesilva
Copy link
Contributor

This is a bug and I will look at it.

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Mar 7, 2017
@comewalk
Copy link
Contributor

comewalk commented Mar 7, 2017

@filipesilva I've already created a fix at #4972 included a test. Please see the PR. Thanks.

@filipesilva
Copy link
Contributor

@comewalk oh thanks! I hadn't seen it and the test is much better than mine. I'll merge yours instead. Cheers!

@comewalk
Copy link
Contributor

comewalk commented Mar 7, 2017

@filipesilva thanks!

@lobo-tuerto
Copy link

Hello guys,

This is still happening in:

@angular/cli: 1.0.0-rc.1
node: 7.7.2
os: linux x64

@dave11mj
Copy link
Contributor

dave11mj commented Mar 12, 2017

@lobo-tuerto I think the code that fixes it hasn't being released. It was only merged 3 days ago, and rc.1 is being out for about a week.

asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this issue Apr 12, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.