Skip to content
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

I cant create react app #11690

Open
bryant-the-coder opened this issue Nov 29, 2021 · 4 comments
Open

I cant create react app #11690

bryant-the-coder opened this issue Nov 29, 2021 · 4 comments

Comments

@bryant-the-coder
Copy link

 npx create-react-app my-app
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'C:\Users\User\.node_modules\node_modules\create-react-app\index.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v17.1.0
 Bryant 16:22 Mon   D:/t  1.68s 
🚀  npx create-react-app my-app

Creating a new React app in D:\t\my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ babel-eslint@npm:10.1.0 is deprecated: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
➤ YN0061: │ urix@npm:0.1.0 is deprecated: Please see https://github.com/lydell/urix#deprecated
➤ YN0061: │ resolve-url@npm:0.2.1 is deprecated: https://github.com/lydell/resolve-url#deprecated
➤ YN0061: │ querystring@npm:0.2.1 is deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
➤ YN0061: │ querystring@npm:0.2.0 is deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
➤ YN0061: │ flatten@npm:1.0.3 is deprecated: flatten is deprecated in favor of utility frameworks such as lodash.
➤ YN0061: │ chokidar@npm:2.1.8 is deprecated: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
➤ YN0061: │ fsevents@npm:1.2.13 is deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
➤ YN0061: │ uuid@npm:3.4.0 is deprecated: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
➤ YN0061: │ svgo@npm:1.3.2 is deprecated: This SVGO version is no longer supported. Upgrade to v2.x.x.
➤ YN0032: │ nan@npm:2.14.2: Implicit dependencies on node-gyp are discouraged
➤ YN0061: │ rollup-plugin-babel@npm:4.4.0 is deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
➤ YN0061: │ @hapi/joi@npm:15.1.1 is deprecated: Switch to 'npm install joi'
➤ YN0061: │ core-js@npm:2.6.12 is deprecated: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js 
versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
➤ YN0061: │ sane@npm:4.1.0 is deprecated: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
➤ YN0061: │ @hapi/bourne@npm:1.3.2 is deprecated: This version has been deprecated and is no longer supported or maintained
➤ YN0061: │ request@npm:2.88.2 is deprecated: request has been deprecated, see https://github.com/request/request/issues/3142
➤ YN0061: │ request-promise-native@npm:1.0.9 is deprecated: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
➤ YN0061: │ har-validator@npm:5.1.5 is deprecated: this library is no longer supported
➤ YN0061: │ @hapi/topo@npm:3.1.6 is deprecated: This version has been deprecated and is no longer supported or maintained
➤ YN0061: │ @hapi/address@npm:2.1.4 is deprecated: Moved to 'npm install @sideway/address'
➤ YN0061: │ @hapi/hoek@npm:8.5.1 is deprecated: This version has been deprecated and is no longer supported or maintained
➤ YN0032: │ evp_bytestokey@npm:1.0.3: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide typescript (p79ddf), requested by fork-ts-checker-webpack-plugin
➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide webpack (p2af19), requested by fork-ts-checker-webpack-plugin
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 9s 124ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ @npmcli/move-file@npm:1.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @pmmmwh/react-refresh-webpack-plugin@npm:0.4.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @rollup/plugin-node-resolve@npm:7.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @rollup/plugin-replace@npm:2.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @rollup/pluginutils@npm:3.1.0 can't be found in the cache and will be fetched from the remote registry   
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ aws-sign2@npm:0.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ aws4@npm:1.11.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ axe-core@npm:4.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ axobject-query@npm:2.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ babel-eslint@npm:10.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ babel-extract-comments@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ core-util-is@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ cosmiconfig@npm:5.2.1 can't be found in the cache and will be fetched from the remote registry 
➤ YN0013: │ cosmiconfig@npm:6.0.0 can't be found in the cache and will be fetched from the remote registry 
➤ YN0013: │ cosmiconfig@npm:7.0.0 can't be found in the cache and will be fetched from the remote registry 
➤ YN0013: │ cra-template@npm:1.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ domutils@npm:1.7.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dot-case@npm:3.0.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dot-prop@npm:5.3.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dotenv-expand@npm:5.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ dotenv@npm:8.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ hmac-drbg@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ hoopy@npm:0.1.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ hosted-git-info@npm:2.8.8 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ hpack.js@npm:2.1.6 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ hsl-regex@npm:1.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ parse-json@npm:2.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ parse-json@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ parse-json@npm:5.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ parse5@npm:5.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ parseurl@npm:1.3.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ path-exists@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-is-absolute@npm:1.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-is-inside@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-key@npm:2.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ path-key@npm:3.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ strip-ansi@npm:3.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-ansi@npm:5.2.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-ansi@npm:6.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-ansi@npm:6.0.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ strip-bom@npm:3.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0001: │ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:371:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:122:30)
    at PassThrough.emit (node:events:390:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
➤ YN0013: │ yargs-parser@npm:13.1.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:18.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:13.3.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:15.4.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yocto-queue@npm:0.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 8s 927ms
➤ YN0000: Failed with errors in 18s 56ms

Aborting installation.
  yarnpkg add --exact react react-dom react-scripts cra-template --cwd D:\t\my-app has failed.

Deleting generated file... package.json
Deleting generated file... yarn.lock
Done.

what the heck is wrong? I uninstalled and reinstalled it again.. but still useless... ahhhhhhhhh I need react for my project. So please help me

@Aayushadh
Copy link

I am also facing same issue

@bryant-the-coder
Copy link
Author

To solve this issue (for me), uninstall and remove all related to node files. Then reinstall node then it works fine. I dont know what bug is csusing this. But reinstaling and reinstalling works. Warning ya if you are using github desktop, and facing an error on publishing a repo. Uninstall github desktop and all the .git that u previously created with. Then reinstall it. That solve the issue for me. I hope it helps. Best of luck. Bye~

@SadorDev
Copy link

SadorDev commented Dec 1, 2021

Its your node version. I had the same issue, but now managed to solve it. I'm sure you have node version 17, which doesn't work for some bizarre reason. Uninstall it and install v16 and it should work

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants