简体   繁体   中英

Error when using npx create-react-app my-app

I've encountered an error when using npx create-react-app my-app below is my error code: npm version is 14 and I've tried 12 also but still encountered this error. Disabled my anti-virus alse

error C:\Users\Gringo-PC\Documents\vvv\my-app\node_modules\ejs: Command failed.
Exit code: 1
Command: node ./postinstall.js
Arguments:
Directory: C:\Users\Gringo-PC\Documents\vvv\my-app\node_modules\ejs
Output:
internal/modules/cjs/loader.js:797
    throw err;

Error: Cannot find module 'C:\Users\Gringo-PC\Documents\vvv\my-app\node_modules\ejs\postinstall.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',

what can be the problem with this one?

我通过删除位于 AppData\\Roaming 中的所有 npm 文件夹然后重新安装 nodejs 来解决这个问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM