frankcollins3 / fill_container

codecamp team project updated with new icon screen menu + puppeteer icon search, GraphQL, redux, relational psql !mongo, and accuweatherAPI
1 stars 0 forks source link

webpack: build script [12:08am] #251

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attemping to do: use this build script to initialize webpack so app can access process.env clientside "build": "webpack --mode production"

how to go about doing so for dev / test env ?

error: { }

proposed approach 0: switch webpack.config.js from client scope to the main root of project where: [prisma, client, server] is

frankcollins3 commented 1 year ago

"build": "webpack --mode production" 👎 npm run build

/package.json built scripts

  "scripts": {
    "server": "nodemon --quiet server",
    "client": "npm start --prefix client",
    "dev": "concurrently \"npm run server\" \"npm run client\"",
    "build": "webpack --mode production"
  },

iterm2 errors:

fill_cont@1.0.0 build /Users/medium/Desktop/fill_cont webpack --mode production


sh: webpack: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! fill_cont@1.0.0 build: `webpack --mode production`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fill_cont@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/medium/.npm/_logs/2023-06-29T04_23_59_882Z-debug.log ➜ fill_cont git:(main) ✗



[10:25am]
frankcollins3 commented 1 year ago

👍 npm i webpack-dev there are two different libraries.

[10:25am]