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

[dev] "Error: Cannot find module 'eslint-traverser'" #114

Closed
SpainTrain opened this issue Oct 20, 2016 · 1 comment
Closed

[dev] "Error: Cannot find module 'eslint-traverser'" #114

SpainTrain opened this issue Oct 20, 2016 · 1 comment

Comments

@SpainTrain
Copy link
Contributor

I am trying to work up a PR, but am encountering a strange module not found issue. Any suggestions are much appreciated.

Full output

$ npm tst

> eslint-plugin-lodash@2.1.4 test /home/spainhower/repos/eslint-plugin-lodash
> npm run lint && npm run unit-test


> eslint-plugin-lodash@2.1.4 lint /home/spainhower/repos/eslint-plugin-lodash
> eslint ./


> eslint-plugin-lodash@2.1.4 unit-test /home/spainhower/repos/eslint-plugin-lodash
> cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot

module.js:327
    throw err;
    ^

Error: Cannot find module 'eslint-traverser'
    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> (/home/spainhower/repos/eslint-plugin-lodash/tests/lib/util/astUtil.js:3:18)
    at Module._compile (module.js:409:26)
    at Module.replacementCompile (/home/spainhower/repos/eslint-plugin-lodash/node_modules/nyc/node_modules/append-transform/index.js:63:13)
    at loader (/home/spainhower/repos/eslint-plugin-lodash/node_modules/babel-register/lib/node.js:144:5)
    at require.extensions.(anonymous function) (/home/spainhower/repos/eslint-plugin-lodash/node_modules/babel-register/lib/node.js:154:7)
    at Object.<anonymous> (/home/spainhower/repos/eslint-plugin-lodash/node_modules/nyc/node_modules/append-transform/index.js:67:4)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at /home/spainhower/repos/eslint-plugin-lodash/node_modules/mocha/lib/mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (/home/spainhower/repos/eslint-plugin-lodash/node_modules/mocha/lib/mocha.js:217:14)
    at Mocha.run (/home/spainhower/repos/eslint-plugin-lodash/node_modules/mocha/lib/mocha.js:485:10)
    at Object.<anonymous> (/home/spainhower/repos/eslint-plugin-lodash/node_modules/mocha/bin/_mocha:457:18)
    at Module._compile (module.js:409:26)
    at Module.replacementCompile (/home/spainhower/repos/eslint-plugin-lodash/node_modules/nyc/node_modules/append-transform/index.js:63:13)
    at module.exports (/home/spainhower/repos/eslint-plugin-lodash/node_modules/nyc/node_modules/default-require-extensions/js.js:8:9)
    at /home/spainhower/repos/eslint-plugin-lodash/node_modules/nyc/node_modules/append-transform/index.js:67:4
    at require.extensions.(anonymous function) (/home/spainhower/repos/eslint-plugin-lodash/node_modules/babel-register/lib/node.js:152:7)
    at Object.<anonymous> (/home/spainhower/repos/eslint-plugin-lodash/node_modules/nyc/node_modules/append-transform/index.js:67:4)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at Function.runMain (/home/spainhower/.node-spawn-wrap-11849-dcc1d80357d0/node:40:10)
    at Object.<anonymous> (/home/spainhower/repos/eslint-plugin-lodash/node_modules/nyc/bin/wrap.js:22:4)
    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 Function.Module.runMain (module.js:441:10)
    at Object.<anonymous> (/home/spainhower/.node-spawn-wrap-11849-dcc1d80357d0/node:140:8)
    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 Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:974:3

=============================== Coverage summary ===============================
Statements   : 22.92% ( 297/1296 )
Branches     : 0.67% ( 4/595 )
Functions    : 3.95% ( 14/354 )
Lines        : 23.07% ( 296/1283 )
================================================================================

npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/home/spainhower/npm/n/bin/node" "/home/spainhower/npm/bin/npm" "run" "unit-test"
npm ERR! node v4.6.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! eslint-plugin-lodash@2.1.4 unit-test: `cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the eslint-plugin-lodash@2.1.4 unit-test script 'cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the eslint-plugin-lodash package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=test nyc mocha tests/**/*.js --reporter=dot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs eslint-plugin-lodash
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls eslint-plugin-lodash
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/spainhower/repos/eslint-plugin-lodash/npm-debug.log
npm ERR! Test failed.  See above for more details.

The module in question is there:

$ npm ls eslint-traverser
eslint-plugin-lodash@2.1.4 /home/spainhower/repos/eslint-plugin-lodash
└── eslint-traverser@1.5.1 

@ganimomer
Copy link
Contributor

Caught the problem, it was a bad version of eslint-traverser. Sorry for the mixup and thanks for catching it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants