Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'exists-sync' after updating #1248

Closed
stevefarwell opened this issue Jun 29, 2016 · 7 comments · Fixed by #1250
Closed

Error: Cannot find module 'exists-sync' after updating #1248

stevefarwell opened this issue Jun 29, 2016 · 7 comments · Fixed by #1250

Comments

@stevefarwell
Copy link

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 Version 10.11.5
  1. Versions. Please run ng --version. If there's nothing outputted, please
    run in a Terminal:
    node --version
    And paste the result here.
    Node v4.0.0
  2. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

Followed the docs for Updating angular-cli

npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@latest

rm -rf node_modules dist tmp
npm install --save-dev angular-cli@latest
ng init

  1. 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:336:15)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/Users/steve/Documents/roundpoint/nowce/nowce-browser/sandbox/nowce-landing/node_modules/angular-cli/node_modules/ember-cli/lib/models/project.js:11:26)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)

  1. Mention any other details that might be useful.

Thanks! We'll be in touch soon.

@michaelchiche
Copy link

I have the same problem

@jprinaldi
Copy link

jprinaldi commented Jun 30, 2016

See #1186.

@stevefarwell
Copy link
Author

I updated node from v4.0.0 to v6.2.2 and updated npm from version 2.14.2 to 3.9.5 (current versions),
deleted the node_modules from my project then did npm install followed by ng init, I was asked if I wanted to overwrite package.json, system-config.ts and a bunch of others which I said yes to all and I was able to get running again. I did lose anything I had added Bootstrap, Sass etc. Thank goodness for source control. I manually merged my changes back in. Everything worked except for the routing. I followed the Dev guide for the new router stuff and finally got that working.

generating routes is disabled, hopefully they get that fixed soon

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jun 30, 2016
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 npm-install task but uses a local 3.10.2 npm version instead.

Fix angular#1186
Fix angular#1191
Fix angular#1201
Fix angular#1209
Fix angular#1207
Fix angular#1248
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jun 30, 2016
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 npm-install task but uses a local 3.10.2 npm version instead.

Fix angular#1186 (main issue)
Fix angular#1191
Fix angular#1201
Fix angular#1209
Fix angular#1207
Fix angular#1248
@butters16
Copy link

Doing an extra npm install worked for me.

ng new PROJECT_NAME
cd PROJECT_NAME
ng serve
exists-sync failure

npm install
ng serve
success

filipesilva added a commit that referenced this issue Jun 30, 2016
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 npm-install task but uses a local 3.10.2 npm version instead.

Fix #1186 (main issue)
Fix #1191
Fix #1201
Fix #1209
Fix #1207
Fix #1248
@Josid88
Copy link

Josid88 commented Jun 30, 2016

I just uninstalled node and npm and reinstalled on versions:

  • node v6.2.2
  • npm to 3.10.2

Same error displayed
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:\dev\ng2\Heroes\node_modules\angular-cli\node_modul es\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)

@dvh91
Copy link

dvh91 commented Jun 30, 2016

Fixed that by going to 'node_modules/angular-cli' inside project and run 'npm install'
then run ng serve again.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants