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'
]
}
npm i --save webpack
Try installing webpack or add it to package.json
Related
I creact app using react. I usually use yarn start to run my app.
Error messege is "cannot find #babel/register" but there is on the package.json.
In my package.json
"#babel/register": "^7.6.2"
my index.js
require('#babel/register');
module.exports = require('./server.js');
Error
> reactjs-simple-boilerplate#1.0.0 start
> node src/server/index.js
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module '#babel/register'
Require stack:
- /Users/mk/kr/kr-application-bd786050/kr-site/src/server/index.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:93:18)
at Object.<anonymous> (/Users/mk/kr/kr-application-bd786050/kr-site/src/server/index.js:1:1)
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 Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/mk/kr/kr-application-bd786050/kr-site/src/server/index.js'
]
}
npm install --save-dev #babel/register is not works for me.
After run this code, I got npm ERR! code EINTEGRITY
Not sure I can help 100% with the given information, but try running the following:
rm -rf node_modules package-lock.json yarn.lock; npm i
That will not only remove your modules, but it'll also remove eventual lock files which are used as conformity for your module versions; It could happen they mismatched versions between installations causing the above error, thus by removing and reinstalling you should solve the problem.
If that's not the case, you might have something off on your package.json, which you'd need to share in order to debug further
I have created a react project using npx
npx create-react-app react-authentication
After that when I run
npm start
It throws an error saying:
internal/modules/cjs/loader.js:456
throw e;
^
Error: Cannot find module '/home/astraCreateDataProperty/react-authentication/node_modules/es-abstract/2020/CreateDataProperty.js'
at createEsmNotFoundErr (internal/modules/cjs/loader.js:929:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:922:15)
at resolveExports (internal/modules/cjs/loader.js:450:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
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:92:18)
at Object.<anonymous> (/home/astra*/react-authentication/node_modules/object.getownpropertydescriptors/implementation.js:3:26)
at Module._compile (internal/modules/cjs/loader.js:1085:14) {
code: 'MODULE_NOT_FOUND',
path: '/home/astra*/react-authentication/node_modules/es-abstract/package.json'
}
I tried some methods to solve this like
rm -rf node_modules
rm -rf package-lock.json
npm cache clean --force
npm install
But still, the same error persists. What is the cause of this error?
I haven't touched node or coded in 3 years does anyone know how to fix this
npm init
node:internal/modules/cjs/loader:922
throw err;
^
Error: Cannot find module '../lib/cli.js'
Require stack:
- /usr/local/lib/node_modules/npm/bin/npm-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:15)
at Function.Module._load (node:internal/modules/cjs/loader:763:27)
at Module.require (node:internal/modules/cjs/loader:991:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:2:1)
at Module._compile (node:internal/modules/cjs/loader:1102:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
at Module.load (node:internal/modules/cjs/loader:967:32)
at Function.Module._load (node:internal/modules/cjs/loader:807:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/lib/node_modules/npm/bin/npm-cli.js' ]
}
i did
brew upgrade node
before this and tried
brew upgrade npm
and gives me
Warning: npm 15.3.0 already installed
I fix it by renaming the node_modules folder located in ''/usr/local/lib' and reinstalling node.js with the installer from nodejs.org which comes with npm
after that I ran rm -r noode_modules to remove the renamed copy of node_modules
not sure if deleting the folder was enough maybe I should have reinstalled all the old packages to overwrite whatever I had before and then removing it with npm uninstall to clean it up
After npm install -g #vue/cli#3.0.0-beta.9 ,
I run the command vue create client
I get the following output:
module.js:557
throw err;
^
Error: Cannot find module 'cmd-shim'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous>
(/Users/atalante/.nvm/versions/node/v9.4.0/lib/node_modules/#vue/cli/lib/util/linkBin.js:10:27)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
i tried rm -rf node_modules and npm install
but it doesn't work.
This usually occurs when there is an issue with either your node or npm installations, Try updating node.js and npm to resolve the issue which has worked for me in the past. This might help in updating npm : Update NPM
I'm getting the following error in my angular2 app with cmd ng serve after deleting the node_modules directory and building it new with npm install.
Error: Cannot find module 'common-tags'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/angular-cli/models/config.js:8:21)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
also npm install common-tags to add it manually does not work
Looks like you should update your angular-cli and clean the cache
npm uninstall -g #angular/cli
npm cache clean --force
npm install -g #angular/cli#latest
npm install