I'm fairly new to Node JS, and trying to run gulp build to compile my project from a theme I bought. I've tried googling my issue and not having any luck really on what I need to look for. If someone could help me out with what I should be looking for or even know what the issue is.
Here is the error I'm getting, and this is from the smartadmin theme on wrapbootstrap.
When I get through all the processes of setup in html-seed directory, it's throwing this error.
PS C:\Users\Kevin Carson\Desktop\smartadmin-html-seed> gulp build module.js:471
throw err;
^
Error: Cannot find module 'require-dir'
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> (C:\Users\Kevin Carson\Desktop\smartadmin-html-seed\gulpfile.js:3:18)
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)
Looks like it it can't find a package. Run npm install from the same directory as your package.json to install the packages.
Related
I get an error when I want to use gulp for deployment.
Error: Cannot find module './internal/streams/stream'
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> (/var/www/pomelo/themes/pomelo/assets/js/node_modules/gulp-replace/node_modules/readable-stream/lib/_stream_readable.js:50: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)
So I use npm install readable-stream, but this is still the error.
Why? How can I fix it?
Try this:
rm -rf node_modules
npm install
What worked for me is to delete the package-lock.json file and the node_modules folder, then run npm install.
It's a core node lib. Try first,
npm cache clean
If not work, reinstall node
i ususally get this error with "claudia update".
i am using node 6.10, npm 5.6.0
if i zip manually and then upload to lambda it works.
what can be issue?
Below error in aws console log:
Unable to import module 'app': Error 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> (/var/task/node_modules/request/lib/helpers.js:3:25) 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)
Question asked at: Gitter
Do npm pack and see what gets copied
it’s likely that your package.json or .npmignore exclude that file
or that some dependency is marked as dev instead of production
check out Claudia-packaging for more info on how to control and troubleshoot packaging
Answer by: Gojko at Gitter that solves the issue.
I have installed node-rdkafka using "npm install node-rdkafka" command on MacBook Pro.
Then, I am trying to build the following node.js code in Eclipse, but observing the following throw error.
In Eclipse Node.JS application,
var Kafka = require('node-rdkafka');
var producer = new Kafka.Producer({
'metadata.broker.list': 'localhost:9092',
'dr_cb': true
});
Build Error observed:
module.js:471
throw err;
^
Error: Cannot find module 'node-rdkafka'
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/pparasuraman/eclipse-workspace/NodeProject1/server.js:5:13)
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)
Could someone please help me to solve this error, as I couldn't find a way to fix it?
In your terminal
cd /Users/pparasuraman/eclipse-workspace/NodeProject1
npm install --save node-rdkafka
I have installed express globally and also ran npm update -g and I can create express app using terminal without problems. But when I create a new nodejs project in Netbeans 8.2 I get these errors :
module.js:472
throw err;
^
Error: Cannot find module 'mkdirp'
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.<anonymous> (/usr/bin/express:10:14)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
Can someone help me integrate Expressjs properly with netbeans please? Thanks in advance.
[UPDATE]
I figured there is something wrong in the Node path in Netbeans. Can someone tell me what do I add here for Ubuntu :
I have installed node, npm, ionic and cordova by following this tutorial : http://ionicframework.com/docs/guide/installation.html
Now when I create a blank app using the command
ionic start todo blank
I get the following error
Error: Cannot find module 'archiver'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/utils.js:3:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Did a lot of googling but couldn't figure out the solution.
Kindly help me resolve this.
Thanks
This problem comes when installing without sudo, In that case we need to add modules like archiver and others one by one. I would recommend re-installing via sudo to avoid all this.