Reference: 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
npm ERR! code 1 npm ERR! path C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\pngquant-bin
npm ERR! command failed npm ERR! command 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! 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! at C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\node_modules\execa\index.js:231:11 npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5) npm ERR! at async Promise.all (index 0)
npm ERR! A complete log of this run can be found in: 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
react-boilerplate@4.0.0 start cross-env NODE_ENV=development node server
node:internal/modules/cjs/loader:936 throw err; ^
Error: Cannot find module 'express' Require stack:
- C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\server\index.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\server\index.js:3:17) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\ksche\Documents\Projects\React_BoilerPlate\into\new_Project\server\index.js' ] }
1条答案
按热度按时间zpf6vheq1#
可能是express没有正确安装。尝试在终端运行
npm install express
(应该在项目的根文件夹中)。如果您现在运行
express -v
,您所拥有的express版本应该会返回给您。如果不是,请确认在输入上述命令时您位于项目的正确目录中,然后重试。