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

npm install causes linter to fail but yarn does not #968

Closed
Ethan-Arrowood opened this issue Jun 10, 2018 · 4 comments
Closed

npm install causes linter to fail but yarn does not #968

Ethan-Arrowood opened this issue Jun 10, 2018 · 4 comments

Comments

@Ethan-Arrowood
Copy link
Member

Ethan-Arrowood commented Jun 10, 2018

What are you trying to achieve or the steps to reproduce?

  1. Clone fastify to local machine (or delete node_modules)
  2. Run npm install (nodejs = 10.4.0, npm = 6.1.0)
  3. Run npm run lint or npm run test or npm run lint:typescript
    • All three commands result in Resolve error: unable to load resolver "node" (see below).
standard: Use JavaScript Standard Style (https://standardjs.com)
  /Users/ethanarrowood/Documents/Projects/fastify/fastify.d.ts:1:1: Resolve error: unableto load resolver "node".
  /Users/ethanarrowood/Documents/Projects/fastify/test/types/index.ts:1:1: Resolve error:unable to load resolver "node".

Alternatively

  1. Clone fastify to local machine (or delete node_modules)
  2. Run yarn install (nodejs = 10.4.0, yarn = 1.5.1)
  3. Run npm run lint or npm run test or npm run lint:typescript
    • Everything runs as expected

What did you expect?

The linter to work and test suite to run with npm (it only works with yarn)

Context

  • node version: 10.4.0
  • fastify version: >=0.37.0
  • os: Mac
  • npm: 6.1.0
@Ethan-Arrowood Ethan-Arrowood mentioned this issue Jun 10, 2018
4 tasks
@mcollina
Copy link
Member

Which version of npm are you using? Is this a bug about npm or yarn? It's not really clear what's the problem.

Can you add step-by-step instructions on how to reproduce?

@Ethan-Arrowood
Copy link
Member Author

Updated now @mcollina

@mcollina
Copy link
Member

I can't reproduce. Might be an npm bug. Remove package-lock.json  if you have one, and also the .npm folder in your home directory.

@Ethan-Arrowood
Copy link
Member Author

Must've been the package-lock.json file. I'll keep this in mind going forward if I run into similar errors. Closing this now.

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