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

Standard 10.0.0 stopped working when installed with pnpm #848

Closed
zkochan opened this issue Apr 8, 2017 · 10 comments

Comments

@zkochan
Copy link

commented Apr 8, 2017

Maybe this is something that should be fixed on the pnpm side, but I don't know what caused the issue, so maybe someone could help me to understand.

From version 10, if standard is installed using pnpm, when running standard, it throws these errors: Resolve error: unable to load resolver "node".

pnpm uses a different node_modules structure and bin files format but standard worked fine till v10. Can someone point me to what was changed that could break this?

@feross

This comment has been minimized.

Copy link
Member

commented Apr 9, 2017

@zkochan What happens when you delete your node_modules and reinstall everything? Does that fix the issue?

Can you post the complete output from standard? This could be due to the new ESLint plugin we introduced: eslint-plugin-import

@zkochan

This comment has been minimized.

Copy link
Author

commented Apr 9, 2017

Yes, I tried removing node_modules. However, with pnpm it is not really needed because it always creates the same node_modules structure.

Here's a repo to reproduce https://github.com/zkochan/pnpm-standard. I committed the whole node_modules folder.

When running npm t, it fails with this:

> pnpm-standard@1.0.0 test /home/zkochan/src/test/pnpm-standard
> standard

standard: Use JavaScript Standard Style (https://standardjs.com)
  /home/zkochan/src/test/pnpm-standard/index.js:1:1: Resolve error: unable to load resolver "node".
npm ERR! Test failed.  See above for more details.
@feross

This comment has been minimized.

Copy link
Member

commented Apr 14, 2017

I'm really sorry but I don't have the bandwidth to debug this at the moment, so I'm going to close this issue to reflect that. If you (or someone else!) figure out how to fix this bug and have further information to share, or want to send a PR, I'm happy to take a look again.

@feross feross closed this Apr 14, 2017

@zkochan

This comment has been minimized.

Copy link
Author

commented Apr 14, 2017

@feross I don't know what you did, but the issue has been fixed by standard@10.0.2. So thank you or anyone else who contributed the mysterious fix!

(the issue might have been a missing dependency. npm and yarn flatten dependencies, so frequently packages work even if someone forgets to add a dependency to package.json. Maybe I'll investigate what was the issue later)

@feross

This comment has been minimized.

Copy link
Member

commented Apr 14, 2017

Glad it worked out for you!

@onlywei

This comment has been minimized.

Copy link

commented Apr 28, 2017

I'm currently experiencing this issue now in my own repository. Suddenly my eslint throws this same error message after switching to pnpm (I am not using standard). Let's see if I can investigate more details...

@zkochan

This comment has been minimized.

Copy link
Author

commented Apr 28, 2017

@onlywei, feel free to file an issue in the pnpm repo

@onlywei

This comment has been minimized.

Copy link

commented Apr 28, 2017

@zkochan currently putting out some fires, so I temporarily removed the import/order rule from my .eslintrc.json. When I have more bandwidth I can investigate more to be able to provide more details for a better issue report.

@feross

This comment has been minimized.

Copy link
Member

commented Apr 29, 2017

@onlywei Thanks for sharing. If you have additional info, that would be much appreciated.

@HeavenSky

This comment has been minimized.

Copy link

commented Dec 31, 2017

@feross @zkochan I found the same issue happend in standard@10.0.3 , but it really fixed in standard@10.0.2 ; below is my command log:

> standard --verbose|snazzy

standard: Use JavaScript Standard Style (https://standardjs.com)

\_\project\exec\npm\src\components\Menu.js
   1:1   error  Resolve error: unable to load resolver "node"  import/no-duplicates
  64:3   error  'componentWillReceiveProps' is not defined     no-undef
  67:3   error  'getArr' is not defined                        no-undef
  69:21  error  'arr' is not modified in this loop             no-unmodified-loop-condition
  74:3   error  'getKeys' is not defined                       no-undef
  81:3   error  'keySwitch' is not defined                     no-undef

\_\project\exec\npm\src\utils\fns.js
  3:3  error  Unexpected constant condition  no-constant-condition

\_\project\exec\npm\src\utils\global.js
  1:1  error  Resolve error: unable to load resolver "node"  import/no-duplicates

\_\project\exec\npm\src\view\index.js
  1:1  error  Resolve error: unable to load resolver "node"  import/no-duplicates

\_\project\exec\npm\src\view\root.js
  1:1  error  Resolve error: unable to load resolver "node"  import/no-duplicates

✖ 10 problems
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-antd@0.0.2 pre: `standard --verbose|snazzy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-antd@0.0.2 pre script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@lock lock bot locked as resolved and limited conversation to collaborators May 25, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
4 participants
You can’t perform that action at this time.