Cannot Find Module ' Webpack' Bigcommerce

346 views Asked by At

I am trying to connect to Bigcommerce Stencil. I am able to pull and download but having trouble with pushing as I kept getting a no webpack module error. I have tried several things like google for hours but no lack.

rm -rf node_modules
rm -f package-lock.json
npm install
npm install --save-dev webpack
npm install --save-dev webpack-dev-server
npm install --legacy-peer-deps
npm install --save --legacy-peer-deps
internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'webpack'

Require stack:
- C:\Users\z\downloads\bigcommerce\skeyndor\stencil.conf.js
- C:\Users\z\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\lib\BuildConfigManager.js
- C:\Users\z\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\lib\stencil-start.js
- C:\Users\z\AppData\Roaming\npm\node_modules\@bigcommerce\stencil-cli\bin\stencil-start.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (C:\Users\z\downloads\bigcommerce\skeyndor\stencil.conf.js:1:15)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\z\\downloads\\bigcommerce\\skeyndor\\stencil.conf.js',
    'C:\\Users\\z\\AppData\\Roaming\\npm\\node_modules\\@bigcommerce\\stencil-cli\\lib\\BuildConfigManager.js',
    'C:\\Users\\z\\AppData\\Roaming\\npm\\node_modules\\@bigcommerce\\stencil-cli\\lib\\stencil-start.js',
    'C:\\Users\\z\\AppData\\Roaming\\npm\\node_modules\\@bigcommerce\\stencil-cli\\bin\\stencil-start.js'
  ]
}
1

There are 1 answers

4
Manisha Jadhav On
npm i --save webpack

Try installing webpack or add it to package.json