簡體   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