When I try to run React boilerplate localhost I getting the error

154 Views Asked by At

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

[email protected] 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

There are 1 best solutions below

0
Traceton Timmerman On

It's likely express wasn't installed correctly. try running npm install express in the terminal(you should be in the root folder of your project).

If you now run express -v, the version of express you have should be returned to you.

If not, verify you are in the correct directory for your project when entering the above commands, and try again.