Hello I have a problem with my webservice. After update all files from master fornt- doesn't work (I use react js, webpack, node js). When i try to start project
I have something like this :
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Projekt\crew\crew-ui\webpack.config.js:1:77)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
So I try install webpack from console but I have next error:
"C:\Program Files\JetBrains\IntelliJ IDEA 2018.1\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" install --scripts-prepend-node-path=auto
npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! code E404
npm ERR! 404 Not Found: React#latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mtmi\AppData\Roaming\npm-cache\_logs\2018-06-28T07_27_01_002Z-debug.log
Related
node:internal/modules/cjs/loader:956
const err = new Error(message);
^
Error: Cannot find module './functions/valid'
Require stack:
C:\Users\paul\AppData\Roaming\npm\node_modules\npm\node_modules\semver\index.js
C:\Users\paul\AppData\Roaming\npm\node_modules\npm\lib\cli.js
C:\Users\paul\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1028:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\paul\AppData\Roaming\npm\node_modules\npm\node_modules\semver\index.js:12:10)
at Module._compile (node:internal/modules/cjs/loader:1126:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at Module.require (node:internal/modules/cjs/loader:1028:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\paul\AppData\Roaming\npm\node_modules\npm\node_modules\semver\index.js',
'C:\Users\paul\AppData\Roaming\npm\node_modules\npm\lib\
Please follow the steps below:
Delete the node_modules directory
Delete the package-lock.json file
Run npm cache clean --force
Run npm install
Run npm start
command
npx react-native init gonative
I ran this command in root terminal (parrot linux) and encountered with error.
It says cannot find module 'metro/src/shared/output/bundle'
Node version : v17.3.0
npm version: 8.3.0
npx version : 8.3.0
output
Need to install the following packages:
react-native
Ok to proceed? (y) y
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'metro/src/shared/output/bundle'
Require stack:
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/bundle/buildBundle.js
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/bundle/bundle.js
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/bundle/index.js
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/index.js
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/index.js
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli/build/commands/index.js
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli/build/index.js
- /root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli/build/bin.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/bundle/buildBundle.js:64:22)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/bundle/buildBundle.js',
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/bundle/bundle.js',
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/bundle/index.js',
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/commands/index.js',
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli-plugin-metro/build/index.js',
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli/build/commands/index.js',
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli/build/index.js',
'/root/.npm/_npx/7930a8670f922cdb/node_modules/#react-native-community/cli/build/bin.js'
]
}
Remove global react-native installer
npm uninstall -g react-native-cli #react-native-community/cli
Install metro bundler
npm install --save-dev metro metro-core
Close all terminal/shell, and then run your command again
While I was compiling the code using npm start an error occurred.
I create the Axios Instance by running npm install --save axios , but after that i run yarn start its not running.strong text
Here is the error log:
yarn run v1.22.4
$ node scripts/start.js
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module 'resolve'
Require stack:
- /home/falguni/Documents/the_burger_builder/config/webpack.config.js
- /home/falguni/Documents/the_burger_builder/scripts/start.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/falguni/Documents/the_burger_builder/config/webpack.config.js:6:17)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/falguni/Documents/the_burger_builder/config/webpack.config.js',
'/home/falguni/Documents/the_burger_builder/scripts/start.js'
]
}
error Command failed with exit code 1.
This is showing in my terminal and it is not running the server.
Capitalize your folder names and js file names.
try
yarn add axios
instead of
npm install axios
I am not clear but i think this will work
> crafty#1.0.0 watch /Users/sirishasamudrala/Desktop/crafty
> webpack --progress -d --config webpack.config.js --watch
/Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/webpack.js:243
throw err;
^
Error: Cannot find module 'extract-text-webpack-plugin'
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 (/Users/sirishasamudrala/Desktop/crafty/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object. (/Users/sirishasamudrala/Desktop/crafty/webpack.config.js:2:25)
at Module._compile (/Users/sirishasamudrala/Desktop/crafty/node_modules/v8-compile-cache/v8-compile-cache.js:178: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)
at Module.require (module.js:604:17)
at require (/Users/sirishasamudrala/Desktop/crafty/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at WEBPACK_OPTIONS (/Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/convert-argv.js:133:13)
at requireConfig (/Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/convert-argv.js:135:6)
at /Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/convert-argv.js:142:17
at Array.forEach ()
at module.exports (/Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/convert-argv.js:140:15)
at yargs.parse (/Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/webpack.js:240:39)
at Object.parse (/Users/sirishasamudrala/Desktop/crafty/node_modules/yargs/yargs.js:552:18)
at /Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/webpack.js:218:8
at Object. (/Users/sirishasamudrala/Desktop/crafty/node_modules/webpack-cli/bin/webpack.js:515:3)
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)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object. (/Users/sirishasamudrala/Desktop/crafty/node_modules/webpack/bin/webpack.js:80:2)
at Module._compile (module.js:660:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crafty#1.0.0 watch: webpack --progress -d --config webpack.config.js --watch
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crafty#1.0.0 watch script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sirishasamudrala/.npm/_logs/2018-05-26T19_22_18_720Z-debug.log
It means extract-text-webpack-plugin is not installed for your project.
Either run
npm i extract-text-webpack-plugin -D
Or
Add it to your package.json manually and run npm i
This usually happens when you copy paste code into your webpack config and forget to update your dependencies.
Do the same for all missing modules.
I am trying to run a test with react/jest. When I do npm test /jest, I am getting the following error:
> # test /Users/suparnasoman/Downloads/create-react-app-master
> node packages/react-scripts/scripts/test.js --env=jsdom
module.js:471
throw err;
^
Error: Cannot find module 'jest'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/suparnasoman/Downloads/create-react-app-master/packages/react-scripts/scripts/test.js:26:14)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
npm ERR! Test failed. See above for more details.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
Check if the npm package is installed successfully.
If the installation is successful check if it is installed globally/locally.
If local, you might need to provide the absolute path node_modules/bin/jest
It seems the jest module is missing, did you try npm --save install jest, or npm install as Chase mentioned?