-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Error creating new app with "create-react-native-app" #118
Comments
Hi! Thanks for the report! I don't think this 'invalid name' error is specific to CRNA, but I may be wrong. Can you take a look at these previous issues and see if any of their resolutions are related to your issue? |
Hi! But still have problems:
Any more hints? |
Have you made sure that you have the correct permissions to your npm cache as suggested in the first link? |
Hi!
RESULT:
|
Do you have an npm mirror or local registry that you use? Anything which would cause name resolution to be different in your environment than others? Can you try installing yarn and/or creating the project in a different directory? I have no idea why npm would be saying this package name is invalid -- scoped packages are pretty commonplace on npm these days. |
Pretty weird... I seem to be having a similar issue with creating a new app. Here's my current environment setup: OSX 10.11.4 (El Capitan)
I've got CRNA install globally via yarn. When I try to create a new app, I get an authentication error on the same scoped packages noted in this issue...
If I try multiple times, it will sometimes fail on a different package but that may just come down to parallel fetching and which one fails first. FWIW, my issue seems to be agnostic of CRNA, I simply can't install scoped pages with yarn for some reason...
|
@Swingline0 from looking at: yarnpkg/yarn#1260 There appear to be a number of issues with yarn and public scoped packages, especially when using a private npm proxy or registry. Can you attempt to rule those problems out? |
Thanks @dikaiosune, I'll check these out when I get home... naturally everything works fine on my work machine. Off the bat #2515 sounds promising. With that said, I feel pretty comfortable in ruling my issue as not being specific to CRNA. Just something that I only first encountered when using CRNA. |
Following the thoughts put forth in yarnpkg/yarn#2515, I commented out the Looks like, in my case, this was an issue with Yarn. Perhaps @camillo777's issue might be related in some way although it doesn't look like it off the bad. Good luck! Thanks @dikaiosune :) |
@Swingline0 glad to hear it. @camillo777 are you able to install any public scoped packages? For example, if you init a blank npm project and run
|
Hi!
Yes, you are right, I got the same error:
Camillos-MacBook-Pro:testingscoped camillo$ npm i --save @dengorbachev/foo
npm ERR! unpack Could not read data for @dengorbachev/[email protected]
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--save"
"@dengorbachev/foo"
npm ERR! node v7.6.0
npm ERR! npm v4.1.2
npm ERR! Invalid name: "@dengorbachev/foo"
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR!
/Users/camillo/MyCamillo/Development/node/testingscoped/npm-debug.log
2017-03-31 21:03 GMT+02:00 Adam Perry <[email protected]>:
… @Swingline0 <https://github.com/Swingline0> glad to hear it.
@camillo777 <https://github.com/camillo777> are you able to install any
public scoped packages? For example, if you init a blank npm project and
run npm install --save @dengorbachev/foo? I'm wondering if this causes a
failure on your machine. For example, here's what happens on mine:
0 ***@***.*** ~
$ mkdir testingscoped
0 ***@***.*** ~
$ cd testingscoped/
0 ***@***.*** ~/testingscoped
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (testingscoped)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /Users/adam/testingscoped/package.json:
{
"name": "testingscoped",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this ok? (yes)
0 ***@***.*** ~/testingscoped
$ npm i --save @dengorbachev/foo
***@***.*** /Users/adam/testingscoped
└── @***@***.***
npm WARN ***@***.*** No description
npm WARN ***@***.*** No repository field.
0 ***@***.*** ~/testingscoped
$ cat package.json
{
"name": "testingscoped",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
***@***.***/foo": "^1.0.0"
}
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#118 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEk3-ArZw4IkEeEfH8_byuUzkb2QdYqBks5rrU4CgaJpZM4MpbBY>
.
|
I decided to uninstall Node and reinstall from scratch using the NodeJS installer on NodeJS site. |
Glad to hear that the reinstall worked for you! |
Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.
Description
Trying to create my first react native app with the "create-react-native-app" script.
Expected Behavior
Just started the command as per the "Getting started" guide.
create-react-native-app cdp2
Observed Behavior
Warning and errors and failed at the end.
Tried with and without "sudo": same result.
If there's an error message, please paste the full terminal output and error message in this code block:
First time this was the error:
Then trying a second time:
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts
:[email protected] /Users/camillo/MyCamillo/Development/node/cdp2
└── (empty)
npm ls react-native
:[email protected] /Users/camillo/MyCamillo/Development/node/cdp2
└── (empty)
npm ls expo
:[email protected] /Users/camillo/MyCamillo/Development/node/cdp2
└── (empty)
node -v
: v7.6.0npm -v
: 4.1.2yarn --version
: -bash: yarn: command not foundwatchman version
: -bash: watchman: command not foundAlso specify:
Reproducible Demo
Please provide a minimized reproducible demonstration of the problem you're reporting.
Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves.
The text was updated successfully, but these errors were encountered: