angular-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.<anonymous> (/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.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 9
  • Comments: 19 (7 by maintainers)

Commits related to this issue

Most upvoted comments

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)

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

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

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)

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)