[英]When I try to run React boilerplate localhost I getting the error
Reference: https://github.com/react-boilerplate/react-boilerplate参考: https://github.com/react-boilerplate/react-boilerplate
I have tried to run the project in localhost as per instructions, but the getting the below code any one could help me please我已尝试按照说明在 localhost 中运行该项目,但是获取以下代码任何人都可以帮助我
npm ERR: code 1 npm ERR! npm 错误:代码 1 npm 错误! path C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\pngquant-bin
路径 C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\pngquant-bin
npm ERR: command failed npm ERR. npm ERR:命令失败 npm ERR。 command C.\WINDOWS\system32\cmd:exe /d /s /c node lib/install:js npm ERR.
命令 C.\WINDOWS\system32\cmd:exe /d /s /c node lib/install:js npm ERR。 ‼ Command failed: C,\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\pngquant-bin\vendor\pngquant:exe --version npm ERR.
‼ 命令失败:C,\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\pngquant-bin\vendor\pngquant:exe --version npm ERR。 npm ERR: npm ERR: ‼ pngquant pre-build test failed npm ERR: i compiling from source npm ERR: × Error: pngquant failed to build.
npm ERR: npm ERR: ‼ pngquant pre-build test failed npm ERR: i compiling from source npm ERR: × Error: pngquant failed to build. make sure that libpng-dev is installed npm ERR!
确保安装了 libpng-dev npm ERR! at C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\execa\index.js:231:11 npm ERR!
在 C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\execa\index.js:231:11 npm 错误! at processTicksAndRejections (node:internal/process/task_queues:96:5) npm ERR!
在 processTicksAndRejections (node:internal/process/task_queues:96:5) npm 错误! at async Promise.all (index 0)
在异步 Promise.all(索引 0)
npm ERR: A complete log of this run can be found in: npm ERR. npm ERR:此运行的完整日志可在以下位置找到:npm ERR。 C:\Users\ksche\AppData\Local\npm-cache_logs\2022-08-15T14_41_21_036Z-debug-0.log PS C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project> npm start
C:\Users\ksche\AppData\Local\npm-cache_logs\2022-08-15T14_41_21_036Z-debug-0.log PS C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project>46DC812E862461B
react-boilerplate@4.0.0 start cross-env NODE_ENV=development node server
react-boilerplate@4.0.0 启动跨环境 NODE_ENV=开发节点服务器
node:internal/modules/cjs/loader:936 throw err; node:internal/modules/cjs/loader:936 抛出错误; ^
^
Error: Cannot find module 'express' Require stack:错误:找不到模块“express”需要堆栈:
It's likely express wasn't installed correctly.可能 express 安装不正确。 try running
npm install express
in the terminal(you should be in the root folder of your project).尝试在终端中运行
npm install express
(您应该在项目的根文件夹中)。
If you now run express -v
, the version of express you have should be returned to you.如果您现在运行
express -v
,您拥有的 express 版本应该返回给您。
If not, verify you are in the correct directory for your project when entering the above commands, and try again.如果没有,请在输入上述命令时验证您是否位于项目的正确目录中,然后重试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.