Closed
Description
Is this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
This bug is not reproducible with NPM. It only affects create-react-app when Yarn is installed.
Environment
-
node -v
: 6.11.0 -
npm -v
: 4.6.1 -
yarn --version
:
Tested with:
0.27.5
0.26.0
0.25.1 -
npm ls react-scripts
: Not applicable, doesn't get this far to check. -
Operating system:
Windows 8.1 Pro
Steps to Reproduce
- Install create-react-app
npm install -g create-react-app
- Install yarn via the windows .msi file.
- Open command prompt and run:
create-react-app myapp
Expected Behavior
New project is created.
Actual Behavior
The following error is encountered.
Aborting installation.
Unexpected error. Please report it as a bug:
{ Error: Cannot find module 'L:\myapp\node_modules\react-scripts\scripts\init.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at getPackageName.then.then.then.packageName (C:\Users\Sean\AppData\Roaming\npm\node_modules\create-react-app\createReactApp.js:298:20)
at process._tickCallback (internal/process/next_tick.js:109:7) code: 'MODULE_NOT_FOUND' }
Full output from the command line here.
As mentioned above this only happens when Yarn is installed and therefore create-react-app uses it for creating the project. If I uninstall Yarn the process completes successfully with NPM.
I'm looking for guidance on how I should attempt to debug this. This might end up being a Yarn issue.