question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eslint fails with Error: Cannot find module 'object-assign' (missing dependency)

See original GitHub issue

What version of ESLint are you using? 2.5.0

What parser (default, Babel-ESLint, etc.) are you using? default

Please show your full configuration:

{
  "env": {
    "node": true,
    "es6": true
  },
  "ecmaFeatures": {
    "blockBindings": true,
    "arrowFunctions": true
  },
  "rules": {
    "array-bracket-spacing": [
      2,
      "never"
    ],
    "brace-style": [
      2,
      "1tbs"
    ],
    "consistent-return": 0,
    "indent": [
      2,
      2
    ],
    "no-multiple-empty-lines": [
      2,
      {
        "max": 2
      }
    ],
    "no-use-before-define": [
      2,
      "nofunc"
    ],
    "no-var": 0,
    "quote-props": [
      2,
      "as-needed"
    ],
    "quotes": [
      2,
      "single"
    ],
    "keyword-spacing": 2,
    "space-before-function-paren": [
      2,
      {
        "anonymous": "always",
        "named": "never"
      }
    ],
    "space-in-parens": [
      2,
      "never"
    ],
    "strict": [
      0,
      "global"
    ],
    "curly": [
      2,
      "all"
    ],
    "eol-last": 2,
    "key-spacing": [
      2,
      {
        "align": "colon"
      }
    ],
    "no-eval": 2,
    "no-with": 2,
    "space-infix-ops": 2,
    "dot-notation": [
      2,
      {
        "allowKeywords": true
      }
    ],
    "eqeqeq": 2,
    "no-alert": 2,
    "no-caller": 2,
    "no-extend-native": 2,
    "no-extra-bind": 2,
    "no-implied-eval": 2,
    "no-iterator": 2,
    "no-label-var": 2,
    "no-labels": 2,
    "no-lone-blocks": 2,
    "no-loop-func": 2,
    "no-multi-str": 2,
    "no-native-reassign": 2,
    "no-new": 2,
    "no-new-func": 2,
    "no-new-wrappers": 2,
    "no-octal-escape": 2,
    "no-proto": 2,
    "no-return-assign": 2,
    "no-script-url": 2,
    "no-sequences": 2,
    "no-unused-expressions": 2,
    "yoda": 2,
    "no-shadow": 2,
    "no-shadow-restricted-names": 2,
    "no-undef-init": 2,
    "camelcase": 2,
    "comma-spacing": 2,
    "new-cap": 2,
    "new-parens": 2,
    "no-array-constructor": 2,
    "no-extra-parens": 2,
    "no-new-object": 2,
    "no-spaced-func": 2,
    "no-trailing-spaces": 2,
    "semi": 2,
    "semi-spacing": [
      2,
      {
        "before": false,
        "after": true
      }
    ]
  }
}

What did you do? Please include the actual source code causing the issue. npm install

What did you expect to happen? a successful installation

What actually happened? Please include the actual, raw output from ESLint.

dougwade redfin.npm/rfnpm ‹dbw-bad-eslint-version› » rm -r node_modules
dougwade redfin.npm/rfnpm ‹dbw-bad-eslint-version› » npm install
|
> rfnpm@0.4.3 prepublish /Users/doug.wade/code/main/redfin.npm/rfnpm
> npm run lint


> rfnpm@0.4.3 lint /Users/doug.wade/code/main/redfin.npm/rfnpm
> eslint --no-eslintrc --config .eslintrc .

module.js:327
    throw err;
    ^

Error: Cannot find module 'object-assign'
    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 /Users/doug.wade/code/main/redfin.npm/rfnpm/node_modules/eslint/node_modules/escope/node_modules/esrecurse/esrecurse.js:32:14
    at Object.<anonymous> (/Users/doug.wade/code/main/redfin.npm/rfnpm/node_modules/eslint/node_modules/escope/node_modules/esrecurse/esrecurse.js:134:2)
    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)

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "run" "lint"
npm ERR! node v4.3.1
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! rfnpm@0.4.3 lint: `eslint --no-eslintrc --config .eslintrc .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rfnpm@0.4.3 lint script 'eslint --no-eslintrc --config .eslintrc .'.
npm ERR! This is most likely a problem with the rfnpm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint --no-eslintrc --config .eslintrc .
npm ERR! You can get their info via:
npm ERR!     npm owner ls rfnpm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/doug.wade/code/main/redfin.npm/rfnpm/npm-debug.log

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install"
npm ERR! node v4.3.1
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! rfnpm@0.4.3 prepublish: `npm run lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rfnpm@0.4.3 prepublish script 'npm run lint'.
npm ERR! This is most likely a problem with the rfnpm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run lint
npm ERR! You can get their info via:
npm ERR!     npm owner ls rfnpm
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/doug.wade/code/main/redfin.npm/rfnpm/npm-debug.log

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:14
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

10reactions
nzakascommented, Mar 25, 2016

We’ve identified the culprit as a bug in the release process. Basically, the release was done from an unclean environment. We’re updating the release tool to ensure a clean environment before release.

3reactions
nzakascommented, Mar 26, 2016

It looks like whatever weird hiccups npm was having yesterday have now been resolved. I did a quick test locally and things look better. Prepping a PR for the build step.

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint/eslint - Gitter
It's possible the bundling script is pulling all dependencies with their sub-dependencies and ... Error: Cannot find module 'object-assign' at Function.
Read more >
eslint import/no-extraneous-dependencies fails to resolve the ...
eslint understands that every package that doesn't have a relative import should exist in your node_modules, just as regular require would ...
Read more >
failed to load config prettier to extend from. - You.com
My assumption is that "no-layout-rules" means that the build is missing dependencies. In my case, after removing "@vue/prettier" from my config NPM right...
Read more >
@vue/cli-plugin-eslint - npm Package Health Analysis | Snyk
The npm package @vue/cli-plugin-eslint was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >
exceljs - npm
ts(1661,34): error TS2503: Cannot find namespace 'NodeJS'. #997. Many thanks to Siemienik Pawel for this contribution. Merged Added Node v16 to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found