Please provide us with the following information:
OS?
Linux, Fedora 23
Node 6.6.0
npm 3.10.3Versions.
Version 1.0.0-beta.18
Repro steps.
mkdir test
cd test
npm install [email protected]
ng new test-appThe log given by the failure.
Cannot find module '@angular-cli/ast-tools'
Error: Cannot find module '@angular-cli/ast-tools'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Class.includedCommands (/home/kevinaud/bin/test/node_modules/angular-cli/addon/index.js:21:16)
at /home/kevinaud/bin/test/node_modules/angular-cli/lib/models/project.js:392:61
at Array.forEach (native)
at Project.addonCommands (/home/kevinaud/bin/test/node_modules/angular-cli/lib/models/project.js:391:15)
at Project.eachAddonCommand (/home/kevinaud/bin/test/node_modules/angular-cli/lib/models/project.js:426:30)
at module.exports (/home/kevinaud/bin/test/node_modules/angular-cli/lib/cli/lookup-command.js:33:13)
at CLI.
at tryCatch (/home/kevinaud/bin/test/node_modules/rsvp/dist/rsvp.js:538:12)
at invokeCallback (/home/kevinaud/bin/test/node_modules/rsvp/dist/rsvp.js:553:13)
at publish (/home/kevinaud/bin/test/node_modules/rsvp/dist/rsvp.js:521:7)
at flush (/home/kevinaud/bin/test/node_modules/rsvp/dist/rsvp.js:2373:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Was working fine yesterday. Today I tried to deploy the app I've been working on with my travis CI build and that's when I first encountered this error. When I tried to reproduce it at the most basic level on my own machine it gave me the same error. I'm not sure what could've changed since I had to version locked in to 1.0.0-beta.18. I have the angular cli globally installed on my machine at version 18 as well and it is working fine. It's only when I try to install it locally to a directory that I am running in to this.
me too, except i am trying to use beta.19
+1
same problem with both beta.18 and beta.19 (ubuntu 16.04)
Am getting the following while doing npm install angular-cli -g
[email protected] install C:\Users\User\AppData\Roaming\npmnode_modules\angular-clinode_modules\execSync
node install.js
[execsync v1.0.2] Attempting to compile native extensions.
{ Error: spawn node-gyp ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn node-gyp',
path: 'node-gyp',
spawnargs: [ 'rebuild' ] }
[execSync v1.0.2]
Native code compile failed!!
Will try to use win32 extension.
[email protected] install C:\Users\User\AppData\Roaming\npmnode_modules\angular-clinode_modules\node-zopfli
node-pre-gyp install --fallback-to-build
+1 v1.0.0-beta.19
Same here ...
Duplicate of #2940
same here after a npm i -g angular-cli@latest
maybe the same as this https://github.com/angular/angular-cli/issues/1882#issuecomment-243311081
+1 v1.0.0-beta.19
Same problem setting up project on a fresh dev machine.
$ ng serve
Cannot find module '@angular-cli/ast-tools'
Error: Cannot find module '@angular-cli/ast-tools'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
Same here using latest:
Cannot find module '@angular-cli/ast-tools'
Error: Cannot find module '@angular-cli/ast-tools'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
For me it has messed up every version since beta 16. Beta 15 gives me a different error, but betas 16, 17, 18, and 19-2 give me the ast-tools issue
I'm thinking it must be an issue with a recently-updated dependency that's marked as ^ in the angular-cli's own package.json, because the issue happens when you npm install even to a previous version
New version 1.0.0-beta.19-3 did not fix it.
( node 7.0.0 / npm 4.0.1 / macOS Sierra v.10.12.1 )
Error: Cannot find module '@angular-cli/ast-tools'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/angular-cli/utilities/ast-utils.js:4:19)
Seeing the same
Ubuntu 16.04,
node v6.9.1
npm 3.10.8
Tried reverting the previous version of angular-cli and clean install of both global and project node packages still seeing the same error
worked for me at 10am this morning (PST) on new project, but broke this afternoon (2PM) when I deleted node_modules/ folder and re-ran npm install again (app that uses angular-cli, which is globally installed).
Run again npm install -g angular-cli it's now working
Dupe of https://github.com/angular/angular-cli/issues/2941, there's more information there.
I had the same issue, turns out I had accidentally also installed angular-cli locally, and it wasn't using the global install.
@filipesilva You closed as dupe but you marked the issue as dupe of itself.
My bad! Wanted to close it as a dupe of https://github.com/angular/angular-cli/issues/2940
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._
Most helpful comment
same here after a
npm i -g angular-cli@latestmaybe the same as this https://github.com/angular/angular-cli/issues/1882#issuecomment-243311081