I did npm -install -react-router-dom and all the good nonense, I have react-router in the node modules. I cannot seem to find the solution to this problem.
Below is the Error Code.
Compiling your contracts...
===========================
> Compiling .\src\contracts\EthSwap.sol
> Compiling .\src\contracts\Migrations.sol
> Compiling .\src\contracts\Token.sol
> Artifacts written to C:\Users\ssand\AppData\Local\Temp\test--2500-cjuPSMOV4zat
> Compiled successfully using:
- solc: 0.5.16+commit.9c3226ce.Emscripten.clang
Error: Cannot find module 'react-router/lib/getRouteParams'
Require stack:
- C:\Users\ssand\eth_swap\node_modules\react-bootstrap\lib\Breadcrumb.js
- C:\Users\ssand\eth_swap\test\EthSwap.test.js
- C:\Users\ssand\AppData\Roaming\npm\node_modules\truffle\node_modules\mocha\lib\mocha.js
- C:\Users\ssand\AppData\Roaming\npm\node_modules\truffle\node_modules\mocha\index.js
- C:\Users\ssand\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\Users\ssand\eth_swap\node_modules\react-bootstrap\lib\Breadcrumb.js:28:37)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Object.require.extensions.<computed> [as .js] (C:\Users\ssand\eth_swap\node_modules\babel-register\lib\node.js:152:7)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\Users\ssand\eth_swap\test\EthSwap.test.js:8:17)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at loader (C:\Users\ssand\eth_swap\node_modules\babel-register\lib\node.js:144:5)
at Object.require.extensions.<computed> [as .js] (C:\Users\ssand\eth_swap\node_modules\babel-register\lib\node.js:154:7)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at C:\Users\ssand\AppData\Roaming\npm\node_modules\truffle\node_modules\mocha\lib\mocha.js:390:36
at Array.forEach (<anonymous>)
Truffle v5.4.19 (core: 5.4.19)
Node v14.17.5
PS C:\Users\ssand\eth_swap>
npm install react-router-dom --save
If it did not work, try to verify your path env variable and add the directory that you installed react module.
Related
I'm getting the error Module build failed: Error: Cannot find module 'ajv' when trying to run vue-cli-service serve --mode dev in my application.
ajv is being installed as a dependency of other packages, it's not a direct dependency in my package.json. I'm using versions node: v14.17.6 and npm : 6.14.15
npm install runs perfectly, the error only appears when running vue-cli-service serve --mode dev
The full error trace is as follows:
ERROR in ./src/main.ts
Module build failed: Error: Cannot find module 'ajv'
Require stack:
- /Users/<user>/node_modules/schema-utils/dist/validate.js
- /Users/<user>/node_modules/schema-utils/dist/index.js
- /Users/<user>/node_modules/cache-loader/dist/index.js
- /Users/<user>/node_modules/cache-loader/dist/cjs.js
- /Users/<user>/<project>/node_modules/webpack/lib/ProgressPlugin.js
- /Users/<user><project>/node_modules/progress-webpack-plugin/index.js
- /Users/<user><project>/node_modules/#vue/cli-service/lib/commands/serve.js
- /Users/<user>/<project>//node_modules/#vue/cli-service/lib/Service.js
- /Users/<user>/<project>/node_modules/#vue/cli-service/bin/vue-cli-service.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/Users/<user>/node_modules/schema-utils/dist/validate.js:15:13)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/Users/<user>/node_modules/schema-utils/dist/index.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
webpack compiled with 1 error
No issues found.
Any idea what could be the issue?
node:internal/modules/cjs/loader:936
throw err;
^
/am finding this error even after remoning installed node/
Error: Cannot find module 'semver'
Require stack:
- /usr/share/nodejs/npm/lib/utils/unsupported.js
- /usr/share/nodejs/npm/lib/cli.js
- /usr/share/nodejs/npm/bin/npm-cli.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. (/usr/share/nodejs/npm/lib/utils/unsupported.js:1:16)
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: [
'/usr/share/nodejs/npm/lib/utils/unsupported.js',
'/usr/share/nodejs/npm/lib/cli.js',
'/usr/share/nodejs/npm/bin/npm-cli.js'
]
}
Node.js v17.4.0
did you installed semver module ?
You can try to install semver with command:
npm install semver --save
I'm working on an api project with node.js and receive this error while trying to hash my code with bcrypt package :
throw err;
^
Error: Cannot find module '/home/emad/work/node.js/npm-demo/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node'
Require stack:
- /home/emad/work/node.js/npm-demo/node_modules/bcrypt/bcrypt.js
- /home/emad/work/node.js/npm-demo/routes/users.js
- /home/emad/work/node.js/npm-demo/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/emad/work/node.js/npm-demo/node_modules/bcrypt/bcrypt.js:6:16)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/emad/work/node.js/npm-demo/routes/users.js:1:16)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/emad/work/node.js/npm-demo/index.js:8:14)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/emad/work/node.js/npm-demo/node_modules/bcrypt/bcrypt.js',
'/home/emad/work/node.js/npm-demo/routes/users.js',
'/home/emad/work/node.js/npm-demo/index.js'
]
}
My OS is a Ubuntu 18.04.5 LTS and I installed all the dependecies that was written down in bcrypt page in npm site
try below steps and run:-
Delete node_modules folder
run npm cache clean --force
npm install
Tried running ng serve this error keep appearing
Error: Cannot find module 'symbol-observable'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Users\USER\AppData\Roaming\npm\node_modules\#angular\cli\lib\init.js:10:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
using npm
npm install --save symbol-observable
https://github.com/benlesh/symbol-observable
then import it where you using
import Symbol_observable from 'symbol-observable';
Cannot find module 'coffee-script' using grunt from a script
module.js:338
throw err;
^
Error: Cannot find module 'coffee-script'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Users\Safa\node_modules\grunt\lib\grunt.js:16:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
Try running
npm install coffee-script#
and then running it again. It is recommended adding it to your package.json file if you haven't already, so in the future you can simply run
npm install