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

Install a project with a clean slate (npm ci) fails with NPM 7 #15095

Closed
fluiddot opened this issue Feb 9, 2021 · 4 comments
Closed

Install a project with a clean slate (npm ci) fails with NPM 7 #15095

fluiddot opened this issue Feb 9, 2021 · 4 comments
Labels
Node Node.js-specific issue ThirdParty upstream problems

Comments

@fluiddot
Copy link

fluiddot commented Feb 9, 2021

The problem

I'm trying to run npm ci (Install a project with a clean slate) with NPM version 7.5.3 and it's giving the following error:

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path <PROJECT_DIR>/node_modules/appium/build/lib/main.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '<PROJECT_DIR>/node_modules/appium/build/lib/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

Project directory has been replaced in the logs with <PROJECT_DIR>.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.20.2
  • Last Appium version that did not exhibit the issue (if applicable): N/A
  • Desktop OS/version used to run Appium: OSX
  • Node.js version (unless using Appium.app|exe): v14.15.5
  • Npm or Yarn package manager: 7.5.3
  • Mobile platform/version under test: N/A
  • Real device or emulator/simulator: N/A
  • Appium CLI or Appium.app|exe: CLI

Details

It can be reproduced by running the following commands in a project folder:

  1. npm install -g npm@7.5.3
  2. npm install appium
  3. npm ci

After this the following runs of npm install fail with the error described above.

@mykola-mokhnach
Copy link
Collaborator

mykola-mokhnach commented Feb 10, 2021

I assume this could be an npm issue. I don't observe anything suspicious in the package config there.

@fluiddot Have you tried to report the issue to NPM itself?

@fluiddot
Copy link
Author

Thanks @mykola-mokhnach for checking it!

I assume this could be an npm issue.

Yeah most likely. This issue is very similar to another one that was reported a couple months ago (#14901). Looks like NPM 7 has a bug regarding how the symlinks are created as explained in this comment.

@fluiddot Have you tried to report the issue to NPM itself?

Yeah, it's already reported in this issue in npm/cli repository. I was wondering if there could be a workaround for this meanwhile a fix is released from NPM, similar to what was done previously in #14901.

@mykola-mokhnach
Copy link
Collaborator

I assume the workaround would be to downgrade NPM to v6

Closed as third party issue

@fluiddot
Copy link
Author

I assume the workaround would be to downgrade NPM to v6

Yes, downgrading to NPM v6 is for now the best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Node Node.js-specific issue ThirdParty upstream problems
Projects
None yet
Development

No branches or pull requests

2 participants