繁体   English   中英

npx create-react-app 失败并出现错误“找不到模块块流

[英]npx create-react-app fails with error "cannot find module block-stream

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

错误:找不到模块“块流”需要堆栈:

  • C:\Users\theop\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\tar\lib\entry-writer.js
  • C:\Users\theop\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\tar\lib\pack.js
  • C:\Users\theop\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\tar\tar.js
  • C:\Users\theop\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\node_modules\tar-pack\index.js
  • C:\Users\theop\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js
  • C:\Users\theop\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\index.js 在 Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) Function.Module._load (node:internal/modules/cjs/loader:778:27) 在 Module.require (node:internal/modules/cjs/loader:1005:19) 在 require (node:internal/modules/cjs/ helpers:102:18) at Object. (C:\Users\theop\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\tar\lib\entry-writer.js:7:19) 在 Module._compile (node:内部/模块/cjs/loader:1103:14) 在 Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10) 在 Module.load (node:internal/modules/cjs/loader :981:32) 在 Function.Module._load (node:internal/modules/cjs/loader:822:12) 在 Module.require (node:internal/modules/cjs/loader:1005:19) { code: 'MODULE_NOT_FOUND ', requireStack: [ 'C:\Users\theop\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\tar\lib\entry-writer.js', 'C:\Users\theo p\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\tar\lib\pack.js', 'C:\Users\theop\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\tar\tar .js', 'C:\Users\theop\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\node_modules\tar-pack\index.js', 'C:\Users\theop \AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js', 'C:\Users\theop\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-反应应用\index.js']}

我以为你先安装了 block-stream

npm init && npm i block-stream && npx create-react-app counter

或者使用vite

npm create vite@latest my-vue-app -- --template react

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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