module.js:471 throw err;
Hi, I have installed all required libraries for node-pocketsphinx given in below link https://www.npmjs.com/package/pocketsphinx But when I try to execute example code I got following error module.js:471 throw err; ^
Error: Cannot find module 'pocketsphinx' 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. (/home/jjadhad/nodejs/test.js:3:33) 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)
please help
Hey did you fix your problem yet?
We need more context. I'm guessing you may be in the wrong directory.
Can you try to print out these commands?
ls -al node_modules
It will be helpful to send your .js file as well.
@kahwee I tried this command but it shows "ls: cannot access node_modules: No such file or directory"
It looks like you did not install your modules correctly.
Typically, if your project is in ./my-project, it should be a package.json and when you run npm install, it should install dependencies based on versions specified in that file. Your installed modules will be in ./my-project/node_modules
Take a look at npm's documentation and there's a video that can help you get started:
- https://docs.npmjs.com/getting-started/installing-npm-packages-locally
- https://docs.npmjs.com/getting-started/using-a-package.json
Without having node_modules in your source directory, you will not be able to run scripts that require them.
thanks @kahwee
I am closing this as solved.
You are wonderful, it is work
Hi, i try to execute my code ,but I got following error, module.js:471 throw err; ^
Error: Cannot find module 'rxjs/add/operator/map'
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.
please help me out
I solved this issue by doing the following
-
C: drive -> Users -> "username" eg. john -> AppData -> Roaming
-
Inside the "Roaming" folder you need to delete both "npm" and "npm-cache" folder.
-
Now build your project, and it should work
Perfect solution @Ariven1 !!!! Thanks
when I run npm run dev I get this error :
module.js:471 throw err; ^ I couldn't fix that using the mentioned solutions
Hi wafa363, Did you followed the steps correctly ?
Explain me how you did the above steps ?
Well the last solution I did is to add "node node_modules/ in each line in the file "package.json" and the errors are gone but I've done changes in app.scss file and I don't see anything when I run npm run watch .. neither the errors nor the changes
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "node node_modules/cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "node node_modules/cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "node node_modules/npm run watch -- --watch-poll",
"hot": "node node_modules/cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "node node_modules/npm run production",
"production": "node node_modules/cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.17",
"bootstrap": "^4.0.0",
"popper.js": "^1.12",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^2.0",
"lodash": "^4.17.4",
"vue": "^2.5.7"
}
}
@Ariven1 I did as you said, but now I'm getting
'ng' is not recognized as an internal or external command, operable program or batch file.
in tjbot i am getting sudo node conversation.js module.js:472 throw err; ^
Error: Cannot find module './config'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.
i have same err i try all solution and nothing worked
events.js:183
throw er; // Unhandled 'error' event
^
module.js:549 throw err; ^
Error: Cannot find module '/home/shivanya/app.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3
..please help me out this problem
module.js:549 throw err; ^
Error: Cannot find module '/home/shivanya/app.js' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3
when i run this "node install_chaincode.js"
Error: Cannot find module '/home/zyl/marbles/config/[object Object]'
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 module.exports (/home/zyl/marbles/utils/connection_profile_lib/index.js:22:14)
at Object.