报错详情如下:
npm ERR! code 128
npm ERR! Command failed: git clone --depth=1 -q -b fix/hr_is_inline git://github.com/sohee-lee7/Squire.git C:\Program Files (x86)\nodejs\node_cache\_cacache\tmp\git-clone-e7baf71d --config core.longpaths=true
npm ERR! warning: templates not found in C:\Users\ROOT\AppData\Local\Temp\pacote-git-template-tmp\git-clone-c6189b7a
npm ERR! fatal: unable to access 'https://github.com/sohee-lee7/Squire.git/': OpenSSL SSL_read: Connection was reset, errno 10054
说白了就是windows不支持NODE_ENV=development的设置方式
-
安装across-env:npm install cross-env --save-dev
-
在NODE_ENV=xxxxxxx前面添加cross-env就可以了
set NODE_ENV=development && webpack --config webpack.config.dev.js
也是同样的效果,还有再补充一点,Node版本很重要,一定要选对版本,16+的版本很多问题会遇见,所以一定要选择合适自己的版本,不用直接冲对新版