Error: Cannot find module 'js-yaml' when running "bower install"

ricky89

I am walking through basic set up of an AngularJS application (Just getting started) and am currently trying to install Bower components for the application.

When I run bower install from the terminal, I get the following error:

Error: Cannot find module 'js-yaml'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (Path\bower\node_modules\configstore\index.js:9:12)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)

I haven’t specified js-yaml module anywhere in my scripts (as far as I am aware), so not sure where this dependency is coming from.

I have tried deleting the node_modules folder, clearing the npm cache, including js-yaml within the package.json file then re-running npm install, but I get the same error when running bower install

If it helps, my bower.json and package.json files are shown below:

Bower.json

{
  "name": "starter-node-angular",
  "version": "1.0.0",
  "dependencies": {
    "bootstrap": "latest",
    "font-awesome": "latest",
    "animate.css": "latest",
    "angular": "latest",
    "angular-route": "latest"
  }
}

package.json

{
  "name": "starter-node-angular",
  "main": "server.js",
  "dependencies": {
    "express" : "~4.5.1",
    "mongoose" : "~3.8.0",
    "body-parser" : "~1.4.2",
    "method-override" : "~2.0.2",
    "js-yaml" : "latest"
  }
}

I am using WebStorm 10.0.4 (empty project as the starting point).

Has anyone come across this or a similar issue and possible point me in the right direction on how to resolve the issue?

WKFY

Running sudo npm install -g js-yaml first should get you in the right direction.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cannot find module '../built/cli.js' when running Protractor

From Dev

Error: Error: Cannot find module ' in angular js?

From Dev

module.js cannot find modules when running iron-node

From Dev

module.js cannot find modules when running iron-node

From Dev

Error: cannot find module when testing with mocha

From Java

Error while running nestjs in production mode, cannot find module

From Dev

Running "npm" returns "Error: Cannot find module 'inherits'"

From Dev

Why do I get this error when I run 'bower install'?

From Dev

Why do I get this error when I run 'bower install'?

From Dev

"bower install underscore" getting error in node.js

From Dev

"bower install underscore" getting error in node.js

From Dev

module.js:327 Error: Cannot find module 'express'

From Java

Error: cannot find module "react-scripts/scripts/init.js' when tryping to install react app

From Dev

Handling "Cannot find module" error when calling node.js fork

From Dev

"Cannot find module" error message when deploying a node.js program on Heroku or RedHat Openshift Online

From Dev

Error: Cannot find module './'

From Dev

Error: Cannot find module './'

From Dev

EACCES Error with Bower install?

From Dev

EACCES Error with Bower install?

From Dev

Running a shell script from node - ERROR { [Error: Cannot find module 'xxx'] code: 'MODULE_NOT_FOUND' }

From Dev

Cannot find module error when using karma-webpack

From Dev

Cannot find module error when using karma-webpack

From Dev

Error: Cannot find module 'webpack' when deploying to heroku

From Dev

Hyperterm Cannot find module error, when installing plugins

From Dev

Error: Cannot find module "." when passing image to child component

From Java

Node.js Error: Cannot find module express

From Dev

Node.js Error: Cannot find module 'request'

From Dev

Sails.js + Grunt "Cannot find module" Error

From Dev

browserify - uncaught error "cannot find module" in bundle.js

Related Related

  1. 1

    Cannot find module '../built/cli.js' when running Protractor

  2. 2

    Error: Error: Cannot find module ' in angular js?

  3. 3

    module.js cannot find modules when running iron-node

  4. 4

    module.js cannot find modules when running iron-node

  5. 5

    Error: cannot find module when testing with mocha

  6. 6

    Error while running nestjs in production mode, cannot find module

  7. 7

    Running "npm" returns "Error: Cannot find module 'inherits'"

  8. 8

    Why do I get this error when I run 'bower install'?

  9. 9

    Why do I get this error when I run 'bower install'?

  10. 10

    "bower install underscore" getting error in node.js

  11. 11

    "bower install underscore" getting error in node.js

  12. 12

    module.js:327 Error: Cannot find module 'express'

  13. 13

    Error: cannot find module "react-scripts/scripts/init.js' when tryping to install react app

  14. 14

    Handling "Cannot find module" error when calling node.js fork

  15. 15

    "Cannot find module" error message when deploying a node.js program on Heroku or RedHat Openshift Online

  16. 16

    Error: Cannot find module './'

  17. 17

    Error: Cannot find module './'

  18. 18

    EACCES Error with Bower install?

  19. 19

    EACCES Error with Bower install?

  20. 20

    Running a shell script from node - ERROR { [Error: Cannot find module 'xxx'] code: 'MODULE_NOT_FOUND' }

  21. 21

    Cannot find module error when using karma-webpack

  22. 22

    Cannot find module error when using karma-webpack

  23. 23

    Error: Cannot find module 'webpack' when deploying to heroku

  24. 24

    Hyperterm Cannot find module error, when installing plugins

  25. 25

    Error: Cannot find module "." when passing image to child component

  26. 26

    Node.js Error: Cannot find module express

  27. 27

    Node.js Error: Cannot find module 'request'

  28. 28

    Sails.js + Grunt "Cannot find module" Error

  29. 29

    browserify - uncaught error "cannot find module" in bundle.js

HotTag

Archive