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

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.

20 Answers

✔️Accepted Answer

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)

More Issues: