fails with the same error with every version of npm that I have tried
See original GitHub issueIf you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.
Can you reproduce the problem with latest npm?
Yes Many errors, especially related to “missing modules”, are due to npm bugs.
If you’re using Windows, follow these instructions to update npm.
If you’re using OS X or Linux, run this to update npm:
npm install -g npm@latest
cd your_project_directory
rm -rf node_modules
npm install
Then try to reproduce the issue again.
Can you still reproduce it?
Description
Expected behaviorreact:create-react-app my-app
Creating a new React app in E:\react\my-app.
Installing packages. This might take a couple minutes. Installing react, react-dom, and react-scripts…
yarn add v0.23.2 info No lockfile found. [1/4] Resolving packages… [2/4] Fetching packages… warning fsevents@1.0.17: The platform “win32” is incompatible with this module. info “fsevents@1.0.17” is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies… error An unexpected error occurred: “EINVAL: invalid argument, utime ‘E:\react\my-app\node_modules\uglify-js\LICENS E’”. info If you think this is a bug, please open a bug report with the information provided in “E:\react\my-app\yarn-erro r.log”. info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation. yarnpkg add --exact react react-dom react-scripts has failed.
Deleting generated file… package.json Deleting generated file… node_modules Deleting generated file… yarn-error.log Deleting my-app / from E:\react Done.
Tell us what you think should happen. create my-app
Actual behavior
errors out Tell us what actually happens. fails
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected): E:\react `-- (empty)node -v
: react:node -v v8.0.0npm -v
: 5.0.3 react:
Then, specify:
- Operating system: Windows 10 x64
- Browser and version: Chrome Version 59.0.3071.86 (Official Build) beta (64-bit)
Reproducible Demo
Please take the time to create a new app that reproduces the issue.
Alternatively, you could copy your app that experiences the problem and start removing things until you’re left with the minimal reproducible demo.
(Accidentally, you might get to the root of your problem during that process.)
Push to GitHub and paste the link here.
By doing this, you’re helping the Create React App contributors a big time! Demonstrable issues gets fixed faster. installed latest yarn react:yarn -v yarn install v0.23.2 [1/4] Resolving packages… [2/4] Fetching packages… [3/4] Linking dependencies… [4/4] Building fresh packages…
success Saved lockfile. Done in 0.13s. got the same error. When I booted to Linux Mint it worked perfectly. No luck at all with Windows.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
Create React App is a tiny shell that just calls
npm
oryarn
so it’s not something we can possibly fix. As you can see from the log, something about your drive seems to confuse yarn:EINVAL
is an OS error code, and it looks like the drive somehow caused the filename to contain a newline.Yup, I too ran into this issue. I was trying to run
yarn
andnpm i
on an exFAT-formatted drive with an abnormally large cluster size of 2MiB, which caused this issue to occur with regularity (and usually on different packages). Reformatting the drive to NTFS with a 4KiB cluster fixed the problem entirely.I’m guessing having a
node_modules
directory that’s taking up several times the space it should on the disk didn’t play nice withnpm
oryarn
.