1

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'
  ]
}
Zac Anger
  • 6,983
  • 2
  • 15
  • 42
JeVic
  • 681
  • 1
  • 11
  • 33
  • What version of stencil-cli do you have installed? If you update to 6.0.0 is the problem resolved? Looks like they've had issues in the past using insecure git ports in dependencys' pacakge.jsons, for some reason. Same for Cornerstone, if you have an old version of that try bringing it up tot 6.7.0 or something else recent. – Zac Anger Dec 18 '22 at 01:40
  • Hi My Stencil is Version 6, Node 14 – JeVic Dec 18 '22 at 10:00

1 Answers1

0
npm i --save webpack

Try installing webpack or add it to package.json

Manisha Jadhav
  • 156
  • 1
  • 1
  • 5