You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Angular cli created new project well, but when I using ' ng server ' to start the server following error comes out. Anybody knows how to solve?
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. (/Users/Mars/Google Drive/Front-End/Project1/hello/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)
@swfree
Thx! But after installing the module it stiil crashed when I try to start the server. This time the error message looks like
(node:7087) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
The Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:
Error: Typescript found the following errors:
.../Project1/hello/tmp/broccoli_type_script_compiler-input_base_path-dvBqPqwe.tmp/0/src/typings.d.ts (5, 1): File '.../Project1/hello/tmp/broccoli_type_script_compiler-input_base_path-dvBqPqwe.tmp/0/typings/browser.d.ts' not found.
@Marswang92
This seems to be an error related to how typings was configured. Maybe it can be solved by creating a browser.d.ts file in your typings folder. I'm not too sure though, so you might be able to find a solution by looking at responses to some other similar issues: typings/typings#151 angular/angular#5807 microsoft/TypeScript#7369
@Marswang92
I also received the same error when running 'ng serve' after creation of a new project with angular-cli. To solve this, I ran the "npm install" command from within the new project's folder. I was then able to run "ng serve" successfully.
Reacted by Piotr Błażejewicz (Peter Blazejewicz), Zhipeng Jiang, Rhys Owen, Vitali Kniazeu, Teancum Besendorfer, Luiz Felippe Gonçalves and Robert
Run npm install in the angular-cli folder globally and then run ng -v to check if working. After you have created a new project with the ng new command and ng serve should not work until you go into node_modules and angular-cli in your root project and npm install again.
Activity
swfree commentedon Jun 24, 2016
Running this command fixed the issue for me. It will install the missing module 'exists-sync':
npm install --save exists-syncMarsZ42 commentedon Jun 24, 2016
@swfree
Thx! But after installing the module it stiil crashed when I try to start the server. This time the error message looks like
swfree commentedon Jun 24, 2016
@Marswang92
This seems to be an error related to how typings was configured. Maybe it can be solved by creating a browser.d.ts file in your typings folder. I'm not too sure though, so you might be able to find a solution by looking at responses to some other similar issues:
typings/typings#151
angular/angular#5807
microsoft/TypeScript#7369
hcsadm commentedon Jun 24, 2016
@Marswang92
I also received the same error when running 'ng serve' after creation of a new project with angular-cli. To solve this, I ran the "npm install" command from within the new project's folder. I was then able to run "ng serve" successfully.
simonstewart commentedon Jun 26, 2016
I had similar issues while running:
npm version 2.14.12
node version 4.3.0
After updating to node version 6.2.2 and npm 3.9.5 all is working OK.
Maybe worth giving that a shot?
Splaktar commentedon Jun 26, 2016
Duplicate of #1186. This should be closed.
JoshWilliams92 commentedon Jun 27, 2016
Run npm install in the angular-cli folder globally and then run ng -v to check if working. After you have created a new project with the ng new command and ng serve should not work until you go into node_modules and angular-cli in your root project and npm install again.
fix(npm): update to npm 3.10.2
fix(npm): update to npm 3.10.2
fix(npm): update to npm 3.10.2 (#1250)
angular-automatic-lock-bot commentedon Sep 5, 2019
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.