Home > Software engineering >  Cannot find module 'webpack' - BigCommerce
Cannot find module 'webpack' - BigCommerce

Time:04-06

Needing to run a BigCommerce site locally and not sure why it's not running. It's running an older version of Cornerstone (V4.4.0) so not sure how to fix:

Node Version: V12.22.7

NPM: 6.14.15

Stencil version - 3.7.0

Error:

Error: Cannot find module 'webpack'
Require stack:

  • /path-to-directory/stencil.conf.js

  • /.nvm/versions/node/v12.22.7/lib/node_modules/@bigcommerce/stencil-cli/lib/BuildConfigManager.js

  • /.nvm/versions/node/v12.22.7/lib/node_modules/@bigcommerce/stencil-cli/lib/stencil-start/js

  • /.nvm/versions/node/v12.22.7/lib/node_modules/@bigcommerce/stencil-cli/bin/stencil-start.js

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helps.js:74:18)
at Object. (path-to-directory/stencil.conf.js:1:15)

As well as this:

npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/bigcommerce-labs/node-sass.git
npm ERR!
npm ERR! fatal: remote error:
npm ERR! The unauthenticated git protocol on port 9418 is no longer supported.
npm ERR! Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
npm ERR!
npm ERR! exited with error code: 128

I have tried moving back Node version but error persists. Checked API key incase it needed to be updated and not the issue.

CodePudding user response:

Check if you have any dependency in your package.json pointing to git://github.com url. Those are now deprecated, you must use https, e.g. git https://github.com/bigcommerce-labs/node-sass.git.

  • Related