Home > Net >  When I create React app It's not creating
When I create React app It's not creating

Time:01-25

I am beginner in react js

I'm Create react app it's give me a error I am trying to do all the things

cmd to create app

npx create-react-app my-app or npx create-react-app@latest your-app-name --use-npm

error

npx create-react-app my-reactchat-app
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\dp312\AppData\Roaming\npm-cache\_logs\2023-01-25T22_46_04_461Z-debug.log
Install for [ 'create-react-app@latest' ] failed with code 1

I'm try to do this cmd in both mode administrator mode also

npm cache clean --force

when run this cmd

npm create-react-app my-app

it's give me error like this

    Usage: npm <command>

where <command> is one of:
    access, adduser, audit, bin, bugs, c, cache, ci, cit,
    clean-install, clean-install-test, completion, config,
    create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
    edit, explore, fund, get, help, help-search, hook, i, init,
    install, install-ci-test, install-test, it, link, list, ln,
    login, logout, ls, org, outdated, owner, pack, ping, prefix,
    profile, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, token, tst, un,
    uninstall, unpublish, unstar, up, update, v, version, view,
    whoami

npm <command> -h  quick help on <command>
npm -l            display full usage info
npm help <term>   search for help on <term>
npm help npm      involved overview

Specify configs in the ini-formatted file:
    C:\Users\dp312\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] C:\Program Files\nodejs\node_modules\npm

try to do this also but still error not soul

how to solve this error ?

anyone can help me

CodePudding user response:

The error message "npm ERR! cb() never called!" typically indicates that there was an issue with the installation process of the package you were trying to install.

This error is often caused by network connectivity issues or issues with the package registry.

Here are some troubleshooting steps you can try:

  • Check your internet connection and ensure that you are connected to the internet.
  • Clear the npm cache: Run the command npm cache clean --force in the command prompt
  • Check if there is any problem with the npm registry by running npm config get registry and ensure that the registry URL is correct.
  • Try running the command again with --verbose flag, to see more detailed output: npm install create-react-app --verbose
  • Run the command npx create-react-app my-reactchat-app instead of npm install create-react-app this will use the package from npm registry without installing it locally.
  • If none of these steps help, you may want to try uninstalling and reinstalling Node.js and npm, or checking for any updates to Node.js or npm.

If the issue persists, you can also check the log file mentioned in the error message "C:\Users\dp312\AppData\Roaming\npm-cache_logs\2023-01-25T22_46_04_461Z-debug.log" for more information.

It's also worth mentioning that there could be other reasons causing this error, and in that case, you may want to check the npm community forum (https://npm.community/).

CodePudding user response:

Define the node engines config in package.json Also, check your node version keep it latest. Check if you're running the app from inside of your app folder.

  • Related