angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Module @angular-cli/ast-tools not found

Open carlosvalle opened this issue 10 years ago • 32 comments

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) Mac OSX El Capitan
  2. Versions. Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here: [email protected] node 6.4.0
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you do on your code? etc. run ng new project
  4. The log given by the failure. Normally this include a stack trace and some more information.
  5. Mention any other details that might be useful. It seems that this npm package has not been published yet

carlosvalle avatar Aug 29 '16 22:08 carlosvalle

Same here

billdwhite avatar Aug 29 '16 23:08 billdwhite

Same problem here. When I list my global node modules, I do get a peer dependency errors as well.

npm list -g -depth=0 /usr/local/lib ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] ├── [email protected] └── [email protected]

npm ERR! peer dep missing: [email protected], required by @angular/[email protected] npm ERR! peer dep missing: typescript@^1.9.0-dev, required by @angular/[email protected] npm ERR! peer dep missing: typescript@^1.9.0-dev, required by @angular/[email protected] npm ERR! peer dep missing: [email protected] || 2.x.x, required by [email protected] npm ERR! peer dep missing: @angular/platform-server@^2.0.0-rc.5, required by @angular/[email protected] npm ERR! peer dep missing: zone.js@^0.6.6, required by @angular/[email protected] npm ERR! peer dep missing: tslint@^3.0.0, required by [email protected] npm ERR! peer dep missing: typescript@^1.9.0-dev, required by @angular/[email protected] npm ERR! peer dep missing: typescript@^1.8.0 || ^1.9.0-dev, required by [email protected]

Thanks!

Yonet avatar Aug 30 '16 00:08 Yonet

+1

sculove avatar Aug 30 '16 01:08 sculove

I get this running ng serve after upgrading to the beta.3.

npm list angular-cli                      

├─┬ [email protected] 
│ ├── UNMET PEER DEPENDENCY @angular/platform-server@^2.0.0-rc.5
│ └── UNMET PEER DEPENDENCY [email protected]
└── UNMET PEER DEPENDENCY [email protected]

npm ERR! peer dep missing: typescript@^1.9.0-dev, required by @angular/[email protected]
npm ERR! peer dep missing: typescript@^1.9.0-dev, required by @angular/[email protected]
npm ERR! peer dep missing: [email protected] || 2.x.x, required by [email protected]
npm ERR! peer dep missing: @angular/platform-server@^2.0.0-rc.5, required by @angular/[email protected]

lindsaymarkward avatar Aug 30 '16 01:08 lindsaymarkward

Just ran: npm install -g angular-cli@webpack

and now I get several errors whenever I run any ng command

$ ng --version
Error while running script "/usr/local/lib/node_modules/angular-cli/addon/ng2/utilities/ast-utils.ts":
Error: Cannot find module '@angular-cli/ast-tools'

rsnj avatar Aug 30 '16 01:08 rsnj

I forgot to publish the ast-tools package. This should be fixed soon.

hansl avatar Aug 30 '16 01:08 hansl

Ok that was fast

renevall avatar Aug 30 '16 03:08 renevall

@hansl thanks for you quick response, I think it is worth noticing that during the installation Im getting the message: [execSync v1.0.2] Native code compile failed!! according to this, the dependency should be dropped in favor of sync-exec as execSync is no longer maintained.

cheers

phmello avatar Aug 30 '16 03:08 phmello

still @angular-cli/ast-tools not found - anyone else also having the same issue after upgrading to .4?

carlosvalle avatar Aug 30 '16 03:08 carlosvalle

after upgrading to .5, same error

phmello avatar Aug 30 '16 03:08 phmello

https://gitter.im/angular/angular-cli - @hansl says it's coming... He's working on it as we 'speak'.

lindsaymarkward avatar Aug 30 '16 03:08 lindsaymarkward

This is fixed with the latest webpack (8) release. Just upgrade to the latest webpack. Sorry for the problems.

Cheers!

hansl avatar Aug 30 '16 03:08 hansl

Now working on node 6.5

Just had to install again.

renevall avatar Aug 30 '16 03:08 renevall

again with "[email protected]", "[email protected]", "@angular-cli/[email protected]"

beliyu avatar Oct 28 '16 19:10 beliyu

after upgrading to [email protected], am getting same error after "ng new my-project" am using: [email protected], [email protected], windows 10/64bit

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) at require (internal/module.js:20:19) at Object. (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\utilities\ast-utils.js:4:19) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\models\find-lazy-modules.js:7:19) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\models\webpack-build-typescript.js:4:27) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\models\webpack-config.js:2:34) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\tasks\build-webpack.js:6:24) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\commands\build.js:3:23) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Class.includedCommands (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\addon\index.js:21:16) at C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\angular-cli\lib\models\project.js:392:61 at Array.forEach (native) at Project.addonCommands (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\angular-cli\lib\models\project.js:391:15) at Project.eachAddonCommand (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\angular-cli\lib\models\project.js:426:30) at module.exports (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\angular-cli\lib\cli\lookup-command.js:33:13) at CLI. (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\angular-cli\lib\cli\cli.js:34:26) at tryCatch (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:538:12) at invokeCallback (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:553:13) at publish (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:521:7) at flush (C:\Users\User\AppData\Roaming\npm\node_modules\angular-cli\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)

brendanalexdr avatar Oct 28 '16 20:10 brendanalexdr

Getting the same with beta-18. It was working earlier today.

ghost avatar Oct 28 '16 20:10 ghost

Same with beta-17 , beta-18 and beta-19-2.

I think that some dependencies were updated yesterday, and this broke angular-cli. The package.json has many '^' in the dependecies.

sdeuvarow avatar Oct 28 '16 20:10 sdeuvarow

Same for me. Worked perfect yesterday, but now trying to set up a new project I do get errors

totemusik avatar Oct 28 '16 20:10 totemusik

Same for me using beta-19-2.

roelver avatar Oct 28 '16 20:10 roelver

Same here, [email protected] (via npm install -g angular-cli, had a previous cli version installed).

node --version => v7.0.0 npm --version => 3.10.8

Using nvm.

miguelgl@mgl-macbook:~$ which ng
/Users/miguelgl/.nvm/versions/node/v7.0.0/bin/ng
miguelgl@mgl-macbook:~$ ll `which ng`
lrwxr-xr-x  1 miguelgl  staff    38B Oct 28 22:33 /Users/miguelgl/.nvm/versions/node/v7.0.0/bin/ng -> ../lib/node_modules/angular-cli/bin/ng
miguelgl@mgl-macbook:~$ ll /Users/miguelgl/.nvm/versions/node/v7.0.0/lib/node_modules/
total 0
drwxr-xr-x  18 miguelgl  staff   612B Oct 28 22:33 angular-cli
drwxr-xr-x  25 miguelgl  staff   850B Oct 25 15:16 npm

Thanks!

MiguelGL avatar Oct 28 '16 20:10 MiguelGL