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

JEST installation fails first time because of missing acorn dependency and then succeeds #6882

Closed
ydsood opened this issue Aug 24, 2018 · 4 comments
Labels

Comments

@ydsood
Copy link

ydsood commented Aug 24, 2018

🐛 Bug Report

Installing JEST first time in CRA application fails and then succeeds when attempted after running npm install

To Reproduce

Steps to reproduce the behavior:

  • create new application using create-react-app
  • execute npm install
  • execute npm install --save-dev jest : fails with error
npm WARN deprecated [email protected]: 1.2.0 should have been a major version bump
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of babel-eslint@^7.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^4.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint-plugin-jsx-a11y@^5.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@>=1.6.0 <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'C:\__Repos__\181\Portal\node_modules\.staging\fsevents-31d9d7c4\node_modules\needle' -> 'C:\__Repos__\181\Portal\node_modules\.staging\needle-486f5acc'

npm ERR! path C:\__Repos__\181\Portal\node_modules\acorn-globals\node_modules\acorn
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\__Repos__\181\Portal\node_modules\acorn-globals\node_modules\acorn' -> 'C:\__Repos__\181\Portal\node_modules\react-scripts\node_modules\jsdom\node_modules\acorn'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ysood\AppData\Roaming\npm-cache\_logs\2018-08-24T00_01_22_529Z-debug.log
  • excute npm install
  • execute npm install --save-dev jest : passes this time

Expected behavior

Should install without issues the first time

Run npx envinfo --preset jest

Paste the results here:

  System:
    OS: Windows 10
    CPU: x64 Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz
  Binaries:
    npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
@SimenB
Copy link
Member

SimenB commented Aug 24, 2018

I've never seen that error, are you able to reproduce it consistently?

That said, CRA comes with Jest, you should not install it yourself. See #5119 (comment).


@gaearon is there any FAQ or something we can point to for these sorts of things? I keep linking to that comment, but maybe some sort of FAQ in the CRA repo would make sense?

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants