57code / vite2-in-action

一个关于vite2+vue3项目开发中常见任务实践的库,很适合作为一个项目的起始点,欢迎大家提pr丰富这个项目。
236 stars 58 forks source link

npm i npm run dev 运行不起来,win7系统 #5

Open suntsh opened 3 years ago

suntsh commented 3 years ago

D:\projects\vite2-in-action>node -v v12.20.2

D:\projects\vite2-in-action>npm run dev

vite2-in-action@0.0.0 dev cross-env NODE_ENV=development vite

failed to load config from D:\projects\vite2-in-action\vite.config.js error when starting dev server: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed at doWrite (_stream_writable.js:399:19) at writeOrBuffer (_stream_writable.js:387:5) at Socket.Writable.write (_stream_writable.js:318:11) at Object.writeToStdin (D:\projects\vite2-in-action\node_modules\esbuild\lib \main.js:1413:19) at sendRequest (D:\projects\vite2-in-action\node_modules\esbuild\lib\main.js :576:14) at Object.buildOrServe (D:\projects\vite2-in-action\node_modules\esbuild\lib \main.js:1044:11) at D:\projects\vite2-in-action\node_modules\esbuild\lib\main.js:1444:17 at new Promise () at Object.build (D:\projects\vite2-in-action\node_modules\esbuild\lib\main.j s:1443:14) at Object.build (D:\projects\vite2-in-action\node_modules\esbuild\lib\main.j s:1334:51)

jaysonwu991 commented 3 years ago

Upgrade your Node.js first,and execute the following commands one after another please

$ rm -Rf node_modules
$ rm package-lock.json
$ npm i -g yarn
$ yarn install
$ yarn dev
suntsh commented 3 years ago

Upgrade your Node.js first,and execute the following commands one after another please

$ rm -Rf node_modules
$ rm package-lock.json
$ npm i -g yarn
$ yarn install
$ yarn dev

还真可以,yarn安装和npm安装有什么区别吗? 我也没升级node.js

jaysonwu991 commented 3 years ago

Upgrade your Node.js first,and execute the following commands one after another please

$ rm -Rf node_modules
$ rm package-lock.json
$ npm i -g yarn
$ yarn install
$ yarn dev

还真可以,yarn安装和npm安装有什么区别吗? 我也没升级node.js

Open official websites of yarn and pnpm, you will find more details. Just do IT.