Unexpected error upon creating a new Project
See original GitHub issueIs this a bug report?
Yes
Did you try recovering your dependencies?
No, everything is up-to-date, and it is a NEW project.
Which terms did you search for in User Guide?
None, since it is a “start” of a project.
Environment
node -v
: v8.9.4npm -v
: 5.6.0yarn --version
(if you use Yarn): 1.6.0npm ls react-scripts
(if you haven’t ejected): `-- (empty)
Then, specify:
- Operating system: Windows 10
- Browser and version (if relevant): N/R
Steps to Reproduce
(Write your steps here:)
- Install Node/NPM
- Install
create-react-app
(npm install -g create-react-app
) - Create a new Project (
create-react-app dashboard
)
Expected Behavior
Create a new Folder with the project inside.
Actual Behavior
source $ create-react-app dashboard
Creating a new React app in ~\Projects\test\source\dashboard.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
yarn add v1.6.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[###########################################################################################################################################################] 1113/1114 Aborting installation.
Unexpected error. Please report it as a bug:
{ Error: Cannot find module '~\Projects\test\source\dashboard\node_modules\react-scripts\package.json'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at checkNodeVersion (~\scoop\persist\nodejs\bin\node_modules\create-react-app\createReactApp.js:514:23)
at getPackageName.then.then.then.packageName (~\scoop\persist\nodejs\bin\node_modules\create-react-app\createReactApp.js:312:7)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7) code: 'MODULE_NOT_FOUND' }
Deleting generated file... package.json
Deleting dashboard / from ~\Projects\test\source
Done.
source $
Reproducible Demo
Since there is no way to create the Project, it is not possible to build a “demo”.
Thanks in advance, and keep up the amazing work!
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (6 by maintainers)
Top Results From Across the Web
Creating a new document processing project fails with ... - IBM
The error message shows only Unexpected Error. The project does get created, but if the user opens it, they get a No Available...
Read more >Creating a project gave me an unexpected error but...
I just set up my jira service desk. I tried creating a project as an administrator, however, it prompts me to say "Hmm......
Read more >Visual Studio has Encountered an Unexpected Error
Open a Solution with many projects. Click Build on the top menu->Build Solution->Cancel. Build again immediately after click cancel. Actual results: No ...
Read more >Error after creating a new Module using Christoc.com's Project ...
Error after creating a new Module using Christoc.com's Project Templates - An unexpected error has occurred · Load the IIS Manager (start>run>inetmgr.exe) ...
Read more >Error when trying to add a new Project task or move current ...
When in Project, if a new Project task is added or if tasks are moved, a generic error is seen: Unexpected error encountered....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see. Maybe worth trying to test with Scoop specifically. I can give it a try to reproduce some time later this or next week.
If you run with
--use-npm
, does the problem persist?@jaisonjjames it is a real solution, but keep in mind you are forcing the tool to use NPM instead of Yarn.
For me, the solutions was “not to use” the official Yarn (from Scoop), and instead use the NPM repo Yarn. (as I said, I’m not able to understand what could be different, I don’t have the knowledge to)