You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently running node 4.4.3 via nvm. Before I had been running 6.3.1 but thought maybe that was the problem. I have tried uninstalling and reinstalling node several times as well. I am currently running the latest version of OS X which I updated two days ago. Thanks for getting back to me btw!
So after trying to find my .npmrc folder I do not seem to have one? All of the paths listed on the npm website as to where it should live do not exists. Any one have any suggestions?
I have tried the project build in several locations both on my desktop and root directory. That is unfortunately the full stack trace I get back. I am also running into the problem when trying to do react-native builds and regular react project builds. I have pasted in the stack trace for those below. As far as deleting node, I have tried several different methods. I found a guide on GitHub gist that listed all the relevant file paths to manually delete. I used a shell script put someone put together. I tried installing with HomeBrew and uninstalling with HomeBrew as well. Someone suggested it has something to do with my .npmrc file. When I went looking for that it seems I do not even have one.
You are the man. I went ahead and logged the directory fs.readFileSync was trying to open and it was some random package.json folder living in my home directory. I deleted it and everything is working. I am assuming this is due to npm's behavior of looking up into parent directories for any package.json it can find for commands. In this case it was finding the random folder, trying to read it and failing. I cannot thank you enough!
Activity
eanplatter commentedon Jul 26, 2016
Hrm, weird. Can you give some more details? What node version are you running on? What operating system are you running?
JasonArkens17 commentedon Jul 26, 2016
I am currently running node 4.4.3 via nvm. Before I had been running 6.3.1 but thought maybe that was the problem. I have tried uninstalling and reinstalling node several times as well. I am currently running the latest version of OS X which I updated two days ago. Thanks for getting back to me btw!
mxstbr commentedon Jul 26, 2016
This is likely a problem with your
.npmrc, this means that somewhere within it there's a path to a directory that no longer exists.This is not a problem with
create-react-appbut with your environment, so I'll close this for now – feel free to continue talking though!JasonArkens17 commentedon Jul 26, 2016
So after trying to find my .npmrc folder I do not seem to have one? All of the paths listed on the npm website as to where it should live do not exists. Any one have any suggestions?
gaearon commentedon Jul 26, 2016
Can you try creating another project?
JasonArkens17 commentedon Jul 26, 2016
I have tried several times to no avail.
gaearon commentedon Jul 27, 2016
Is
the complete stack trace you have?
Can you try creating the project in different folders?
Which guide have you followed for reinstalling Node?
JasonArkens17 commentedon Jul 27, 2016
I have tried the project build in several locations both on my desktop and root directory. That is unfortunately the full stack trace I get back. I am also running into the problem when trying to do react-native builds and regular react project builds. I have pasted in the stack trace for those below. As far as deleting node, I have tried several different methods. I found a guide on GitHub gist that listed all the relevant file paths to manually delete. I used a shell script put someone put together. I tried installing with HomeBrew and uninstalling with HomeBrew as well. Someone suggested it has something to do with my .npmrc file. When I went looking for that it seems I do not even have one.
JasonArkens17 commentedon Jul 27, 2016
Here is another stack trace when trying to run a react-native build
gaearon commentedon Jul 27, 2016
Try logging
fs.readFileSyncarguments. This should give you a good guess as to which file it’s looking for.JasonArkens17 commentedon Jul 27, 2016
You are the man. I went ahead and logged the directory
fs.readFileSyncwas trying to open and it was some randompackage.jsonfolder living in my home directory. I deleted it and everything is working. I am assuming this is due tonpm'sbehavior of looking up into parent directories for anypackage.jsonit can find for commands. In this case it was finding the random folder, trying to read it and failing. I cannot thank you enough!gaearon commentedon Jul 27, 2016
No problem, thanks for explaining!