Yes
No project directory created.
None.
npx: installed 1 in 2.176s
Path must be a string. Received undefined
npx: installed 67 in 4.773s
C:\Users\Martin\AppData\Roaming\npm-cache_npx13704node_modules\create-react-app\index.js
Environment:
OS: Windows 7
Node: 6.9.5
Yarn: Not Found
npm: 6.1.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
ERROR: package.json not found!
npx create-react-app my-app
I expected it to create my-app directory.
D:\work\CLRVSN\projects>npx create-react-app my-app
npx: installed 1 in 2.481s
Path must be a string. Received undefined
npx: installed 67 in 6.55s
C:\Users\Martin\AppData\Roaming\npm-cache\_npx\12000\node_modules\create-react-app\index.js
Creating a new React app in D:\work\CLRVSN\projects\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! Unexpected end of JSON input while parsing near '...22.1.0","jest-util":"'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Martin\AppData\Roaming\npm-cache\_logs\2018-05-29T16_12_43_855Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting my-app / from D:\work\CLRVSN\projects
Done.
The end of the log file is:
2078 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...22.1.0","jest-util":"'
2078 verbose stack at Object.parse (native)
2078 verbose stack at parseJson (C:\Users\Martin\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
2078 verbose stack at consumeBody.call.then.buffer (C:\Users\Martin\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
2078 verbose stack at process._tickCallback (internal/process/next_tick.js:103:7)
2079 verbose cwd D:\work\CLRVSN\projects\my-app
2080 verbose Windows_NT 6.1.7601
2081 verbose argv "D:\\open\\nodejs\\node.exe" "C:\\Users\\Martin\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts"
2082 verbose node v6.9.5
2083 verbose npm v6.1.0
2084 error Unexpected end of JSON input while parsing near '...22.1.0","jest-util":"'
2085 verbose exit [ 1, true ]
(Paste the link to an example project and exact instructions to reproduce the issue.)
I've managed to fix this by deleting everything from C:\Users\Martin\AppData\Roaming\npm-cache
Most helpful comment
I've managed to fix this by deleting everything from C:\Users\Martin\AppData\Roaming\npm-cache