Skip to content

Error: Cannot find module 'exists-sync' #1201

Closed

Description

@MarsZ42

osx: El Captain,
node: v 6.2.2,
npm: v 3.10.3

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)

Activity

  1. swfree commented on Jun 24, 2016

    @swfree

    Running this command fixed the issue for me. It will install the missing module 'exists-sync':
    npm install --save exists-sync

  2. MarsZ42 commented on Jun 24, 2016

    @MarsZ42
    Author

    @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.

  3. swfree commented on Jun 24, 2016

    @swfree

    @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

  4. hcsadm commented on Jun 24, 2016

    @hcsadm

    @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.

  5. simonstewart commented on Jun 26, 2016

    @simonstewart

    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?

  6. Splaktar commented on Jun 26, 2016

    @Splaktar
    Contributor

    Duplicate of #1186. This should be closed.

  7. JoshWilliams92 commented on Jun 27, 2016

    @JoshWilliams92

    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.

  8. added 2 commits that reference this issue on Jun 30, 2016
    afb7391
    f5bf475
  9. added a commit that references this issue on Jun 30, 2016
    6f0ebfb
  10. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  11. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions