angular-cli: Cannot find module 'exists-sync'
-
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?) os: Windows 10
-
Versions. Please run
ng --version
. If there’s nothing outputted, please angular-cli: 1.0.0-beta.8 node: 6.2.2 os: win32 x64 -
Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc. I updated to the latest cli version (beta 8). When I run ng outside the project it shows me all the options. But when I run it inside my project I get an error.
-
The log given by the failure. Normally this include a stack trace and some more information. Error: Cannot find module ‘exists-sync’ at Function.Module._resolveFilename (module.js:440:15) at Function.Module._load (module.js:388:25) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object.<anonymous> (C:\xampp\htdocs\foo1\node_modules\angular-cli\node_modules\ember-cli\lib\models\project.js:11:26) at Module._compile (module.js:541:32) at Object.Module._extensions…js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3)
-
Mention any other details that might be useful.
Thanks! We’ll be in touch soon.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 9
- Comments: 48 (3 by maintainers)
Commits related to this issue
- bump up versions; routing seems to work now; - Navigation problem was solved by new version of @angular/router (alpha.8) - adds some packages to devDependencies because of some angular-cli problems ... — committed to angular-buch/book-monkey2 by d-koppenhagen 8 years ago
- fix(npm): update to npm 3.10.2 The npm task from our current ember-cli install uses npm 2.x.x, which was causing issues with some of the dependencies. This PR copies over all files needed for the np... — committed to filipesilva/angular-cli by filipesilva 8 years ago
- fix(npm): update to npm 3.10.2 The npm task from our current ember-cli install uses npm 2.x.x, which was causing issues with some of the dependencies. This PR copies over all files needed for the np... — committed to filipesilva/angular-cli by filipesilva 8 years ago
- fix(npm): update to npm 3.10.2 (#1250) The npm task from our current ember-cli install uses npm 2.x.x, which was causing issues with some of the dependencies. This PR copies over all files needed ... — committed to angular/angular-cli by filipesilva 8 years ago
I ran “npm install” twice:
I hit this too and got around it by running a
npm install
Re-installing the CLI (to beta8) and starting a brand new project, I had to do additional npm installs before I was able to run the app.
npm i -D exists-sync npm i -D object-assign npm i -D minimatch npm i -D walk-sync npm i -D through
go to
angular-cli
installed directory ex:C:\xampp\htdocs\foo1\node_modules\angular-cli
runnpm i
Hi everyone, apologies for taking so long to address this issue. First of all, thank you for all the comments and proposed temporary solutions.
Reading through the thread allowed me to zone into the real issue - the way
ng new
rannpm
. Turns out it was using a 2.x.x npm internally. This is why when you didnpm install
things just worked again, your global npm version was more recent.Simply adding these missing dependencies to the project was not the solution, because the problem was that npm wasn’t correctly installing them in the first place.
I created a PR that updates the local npm to 3.10.2. That should fix all these issues.
Error: Cannot find module ‘exists-sync’ at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (C:\Users\Martin\Documents\project\newProject\project\node_modules\angular-cli\node_modules\ember-cli\lib\models\project.js:11:26) at Module._compile (module.js:409:26) at Object.Module._extensions…js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17)
algo asi ?
en esta carpeta dale npm install y fue … , en la tuya en tu caso \Users\Martin\Documents\project\newProject\project\node_modules\angular-cli\node_modules
you have to go inside the directory of angular cli , inside of node and npm install
Upgraded to the latest npm 5.0.3 and had
angular cli cannot find module 'rsvp'
Going to node_modules/angular/cli and runningnmp i
fixed it but…@Rafi993 it seems to be that this is not resolves as of now.
I guess this is the problem with NPM itself.
ember-cli has a dependency “exists-sync”: “0.0.3” where as angular-cli has the same as devDependency.
npm install -g angular-cli
doesn’t install devDependencies of angular-cli. But they should get installed inside ember-cli; But it isn’t inside ember node-modules.Same is the case with
object-assign
,minimatch
,through
andwalk-sync
.Just hit this problem too. Should the readme be updated to mention
npm install
as this doesn’t instil confidence for newcomers? The first thing the readme shows is:and that doesn’t work due to this issue.
Ok, so to all the people who had this problem, please make sure you got the latest & current version of node installed (at this time : node : 6.2.2 and npm : 3.9.5) then install angular-cli by typing
npm install -g angular-cli
(sudo if you get warns) then go to/node_modules
, find the angular-cli folder, and runnpm install
(sudo
may be required) then, start a projectng new projectname
go into the new created project folder and typenpm i
. Peace !Fresh install right now Windows 10 versions :
So go in :
C:\Users\senayar\AppData\Roaming\npm\node_modules\angular-cli
and run
npm i
finally got the same problem running ng serve after this :
Updating npm was the solution :
npm install npm -g
npm : 3.10.3
got same problem, npm install --save works for me
I did npm install in the nodemodules and it generated new project but when I typed
ng serve --port 4201 --live-reload-port 49153
It shows the same error againI still get the same error after running npm install 😕
ng init module.js:327 throw err; ^
Error: Cannot find module ‘exists-sync’ at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object.<anonymous> (/srv/fuma/frontend/node_modules/angular-cli/node_modules/ember-cli/lib/models/project.js:11:26) at Module._compile (module.js:409:26) at Object.Module._extensions…js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17)
Mac OS X El Capitan 10.11.5 angular-cli: 1.0.0-beta.8 node v4.4.5 npm 2.15.4