Boss Machine Project - server not working


I have checked my code with the provided solution code and can’t see where the issues are, however when I attempt to run the server I get the following error message:

PS C:\Users…\project-4-boss-machine-start> node server.js
throw err;

Error: Cannot find module ‘webpack/types’
Require stack:

  • C:\Users…\project-4-boss-machine-start\server\checkMillionDollarIdea.js
  • C:\Users…\project-4-boss-machine-start\server\ideas.js
  • C:\Users…\project-4-boss-machine-start\server\api.js
  • C:\Users…\project-4-boss-machine-start\server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object. (C:\Users…\project-4-boss-machine-start\server\checkMillionDollarIdea.js:1:34)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions…js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [

Node.js v20.9.0
PS C:\Users…\project-4-boss-machine-start>

Any help with this would be appreciated.


Are you type-checking? You’re missing the module that provides type definitions for Webpack. Try installing the ‘webpack/types’ module and that should clear it up. It says you are missing that module and that’s what’s causing ‘checkMillionDollarIdea.js’ to fail, which is causing ‘ideas.js’, ‘api.js’, and ‘server.js’ to fail.

npm install webpack/types

Hi, thanks for getting back to me about this. I have attempted to install this module and received the following response:

PS C:\Users…\project-4-boss-machine-start> npm install webpack/types
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/webpack/types.git
npm ERR! Warning: Permanently added ‘’ (ED25519) to the list of known hosts.
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

Any help to resolve this would be greatly appreciated.


Did you run ‘npm install’ in the starter project root folder when you first unzipped it? If so, try running the following

npm install --save-dev webpack webpack-cli

If not, run ‘npm install’ instead

How’d it go? Any luck?