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

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

Closed
doug-wade opened this Issue Mar 25, 2016 · 17 comments

Comments

Projects
None yet
@doug-wade

doug-wade commented Mar 25, 2016

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

@eslintbot eslintbot added the triage label Mar 25, 2016

@alberto

This comment has been minimized.

Show comment
Hide comment
@alberto

alberto Mar 25, 2016

Member

@nzakas i saw you just commited bundling deps and it looks like it could be related. Can you have a look at it?

Member

alberto commented Mar 25, 2016

@nzakas i saw you just commited bundling deps and it looks like it could be related. Can you have a look at it?

@tuckbick

This comment has been minimized.

Show comment
Hide comment
@tuckbick

tuckbick Mar 25, 2016

When running npm ls, in addition to object-assign, I am also seeing UNMET DEPENDENCY through@^2.3.6 and UNMET DEPENDENCY esprima@^2.6.0

tuckbick commented Mar 25, 2016

When running npm ls, in addition to object-assign, I am also seeing UNMET DEPENDENCY through@^2.3.6 and UNMET DEPENDENCY esprima@^2.6.0

@ben-eb

This comment has been minimized.

Show comment
Hide comment

ben-eb commented Mar 25, 2016

@btmills

This comment has been minimized.

Show comment
Hide comment
@btmills

btmills Mar 25, 2016

Member

Disclaimer: I've never used bundledDependencies before, so I'm debugging from zero knowledge.

eslint

That's on a machine with npm 3, and those are the three dependencies that we're getting errors about.

Member

btmills commented Mar 25, 2016

Disclaimer: I've never used bundledDependencies before, so I'm debugging from zero knowledge.

eslint

That's on a machine with npm 3, and those are the three dependencies that we're getting errors about.

@btmills

This comment has been minimized.

Show comment
Hide comment
@btmills

btmills Mar 25, 2016

Member
$ npm --version
3.3.12
$ ls node_modules
eslint esprima object-assign through
$ node_modules/.bin/eslint --init
// Works just fine
$ npm --version
2.7.4
$ ls node_modules
eslint
$ node_modules/.bin/eslint --init
// Throws the error above

Does this mean npm 3 deduping was masking the issue?

Member

btmills commented Mar 25, 2016

$ npm --version
3.3.12
$ ls node_modules
eslint esprima object-assign through
$ node_modules/.bin/eslint --init
// Works just fine
$ npm --version
2.7.4
$ ls node_modules
eslint
$ node_modules/.bin/eslint --init
// Throws the error above

Does this mean npm 3 deduping was masking the issue?

@ilyavolodin

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin Mar 25, 2016

Member

@btmills That would be my guess

Member

ilyavolodin commented Mar 25, 2016

@btmills That would be my guess

@alberto alberto added bug accepted build and removed triage labels Mar 25, 2016

The-Compiler added a commit to qutebrowser/qutebrowser that referenced this issue Mar 25, 2016

@mourner

This comment has been minimized.

Show comment
Hide comment
@mourner

mourner Mar 25, 2016

Contributor

From http://status.npmjs.org/:

We have identified 74 packages (with 83 total publications) affected by the misconfiguration. We are diligently working to fix the metadata for the failed versions so that they can be republished by their authors.

I expect object-assign to be among these packages. So it looks like an NPM issue that will be resolved soon.

Contributor

mourner commented Mar 25, 2016

From http://status.npmjs.org/:

We have identified 74 packages (with 83 total publications) affected by the misconfiguration. We are diligently working to fix the metadata for the failed versions so that they can be republished by their authors.

I expect object-assign to be among these packages. So it looks like an NPM issue that will be resolved soon.

@serkanyersen

This comment has been minimized.

Show comment
Hide comment
@serkanyersen

serkanyersen Mar 25, 2016

@mourner I was able to fix the issue by running npm install object-assign. Installing the package was fine.
It seems more like it was not included in the dependencies?

serkanyersen commented Mar 25, 2016

@mourner I was able to fix the issue by running npm install object-assign. Installing the package was fine.
It seems more like it was not included in the dependencies?

@mourner

This comment has been minimized.

Show comment
Hide comment
@mourner

mourner Mar 25, 2016

Contributor

@serkanyersen ESLint doesn't use this package, it's a sub-dependency, which should be installed, but doesn't because of an NPM bug, I assume.

Contributor

mourner commented Mar 25, 2016

@serkanyersen ESLint doesn't use this package, it's a sub-dependency, which should be installed, but doesn't because of an NPM bug, I assume.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Mar 25, 2016

Member

We've confirmed that this is an issue only when using npm < 3 due to the deduping. It's likely that npm 3 deduping is masking a missed dependency in one of our dependencies.

Member

nzakas commented Mar 25, 2016

We've confirmed that this is an issue only when using npm < 3 due to the deduping. It's likely that npm 3 deduping is masking a missed dependency in one of our dependencies.

@thefotios

This comment has been minimized.

Show comment
Hide comment
@thefotios

thefotios Mar 25, 2016

@mourner not sure if that's applicable. eslint and object-assign technically "install" fine. The npmjs.org bug was related to being able to fetch packages (I was hitting it before and getting a 404 for a supposedly published package).

This seems to be a packaging issue here in eslint / how npm@2 handles bundledDependencies

thefotios commented Mar 25, 2016

@mourner not sure if that's applicable. eslint and object-assign technically "install" fine. The npmjs.org bug was related to being able to fetch packages (I was hitting it before and getting a 404 for a supposedly published package).

This seems to be a packaging issue here in eslint / how npm@2 handles bundledDependencies

@ilyavolodin

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin Mar 25, 2016

Member

We identified the issue causing this bug and we are in the process of fixing it now. Point release incoming.

Member

ilyavolodin commented Mar 25, 2016

We identified the issue causing this bug and we are in the process of fixing it now. Point release incoming.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Mar 25, 2016

Member

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.

Member

nzakas commented 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.

@aivus

This comment has been minimized.

Show comment
Hide comment
@aivus

aivus Mar 25, 2016

@mourner

I expect object-assign to be among these packages.

No, object-assign is not in this packages: https://gist.github.com/soldair/151e14e506c27c416ceb#file-versions-json

aivus commented Mar 25, 2016

@mourner

I expect object-assign to be among these packages.

No, object-assign is not in this packages: https://gist.github.com/soldair/151e14e506c27c416ceb#file-versions-json

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Mar 25, 2016

Member

We just pushed v2.5.1 which should allow people to start installing ESLint again. I had to do this manually due to lack of time/energy.

We're leaving this open so we can update our tools and integrate the fix permanently.

Member

nzakas commented Mar 25, 2016

We just pushed v2.5.1 which should allow people to start installing ESLint again. I had to do this manually due to lack of time/energy.

We're leaving this open so we can update our tools and integrate the fix permanently.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Mar 25, 2016

Member

There's a related problem in v2.5.1:

$ node_modules/.bin/eslint --init
Cannot find module 'through'
Error: Cannot find module 'through'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\Nicholas\projects\personal\tmp\node_modules\eslint\node_modules\inquirer\lib\ui\bottom-bar.js:6:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
Member

nzakas commented Mar 25, 2016

There's a related problem in v2.5.1:

$ node_modules/.bin/eslint --init
Cannot find module 'through'
Error: Cannot find module 'through'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (C:\Users\Nicholas\projects\personal\tmp\node_modules\eslint\node_modules\inquirer\lib\ui\bottom-bar.js:6:15)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas Mar 26, 2016

Member

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.

Member

nzakas commented 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.

ilyavolodin added a commit that referenced this issue Mar 26, 2016

Merge pull request #5688 from eslint/issue5680
Build: Fix bundling script (fixes #5680)

NoctuaNivalis added a commit to NoctuaNivalis/qutebrowser that referenced this issue Apr 5, 2016

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.