Yes
System:
OS: macOS 10.14.1
CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Binaries:
Node: 11.2.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Browsers:
Chrome: 70.0.3538.110
Safari: 12.0.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: 2.1.1
npx create-react-app my-app
Create a new cra app
I'm getting this error
Creating a new React app in /..../...
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.12.3
[1/4] 馃攳 Resolving packages...
error Couldn't find package "@babel/plugin-proposal-decorators" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /.../... has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting my-app/ from /.../...
Done.
I experienced the same with yarn create react-app my-app
Creating a new React app in /.../.../.../.../....
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.12.3
[1/4] 馃攳 Resolving packages...
error Couldn't find package "@babel/plugin-proposal-decorators" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts --cwd /.../.../.../.../... has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting reducer-hook-todo/ from /Users/whacktop/Desktop/Projects
Done.
error Command failed.
Exit code: 1
seems to be an encoding issue
here's a more detailed error
Request "https://registry.yarnpkg.com/@babel%2fplugin-proposal-decorators" finished with status code 401.
Using npm instead of yarn gives a different errror
npm http fetch GET 401 https://registry.npmjs.org/@babel%2fcore 303ms
npm timing stage:rollbackFailedOptional Completed in 1ms
npm timing stage:runTopLevelLifecycles Completed in 897ms
npm verb stack Error: 401 Unauthorized: @svgr/[email protected]
When using yarn, I get the same error as above. When I'm running the command with the --use-npm
flag, I'm getting the following error
npm ERR! code E401
npm ERR! 404 401 Unauthorized: @babel/template@^7.1.0
This issue migth be related with this:
https://npm.community/t/can-t-install-scoped-packages-e401-unauthorized/3631/5
In the thread a suggested workaround was logging out of npm (npm logout
). It worked for me :)
@Jokinen that worked. But I'd say a not intuitive solution to the problem, to say at least.
@jayarjo The linked thread implied that you can login again after logging out and that everything should work as expected--that knowledge may be helpful if you depends on features requiring auth :) Haven't tested myself.
The error seems to be due to an issue with npm
, hopefully it'll be resolved soon.
@Jokinen that worked! Thanks for pointing it out. I had to npm logout
and then npm login
even tho I work with public packages. We'll have to follow that issue to see how it goes
After npm login / logout, I still encountered an error but this time around, it refers to incompatible version of node as shown below:
error [email protected]: The engine "node" is incompatible with this module. Expected version "^6.14.0 || ^8.10.0 || >=9.10.0".
error Found incompatible module
So to resolve my issue, just select the required version, in my case, nvm use v8.11.1
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.
Most helpful comment
This issue migth be related with this:
https://npm.community/t/can-t-install-scoped-packages-e401-unauthorized/3631/5
In the thread a suggested workaround was logging out of npm (
npm logout
). It worked for me :)