When I run any heroku command or open a page where user is not signed in. This is the only error I'm getting over and over again.
I did remove the Heroku tmp today but I pushed the app fine afterwards, the error suddenly happened.
When i go to the app it opens up if the user is signed in but when opened incognito it has an error, checking the logs it's the same error below
Can anyone help me out on this one?
module.js:491
throw err;
Error: Cannot find module 'universalify'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/ubuntu/.local/share/heroku/client/node_modules/fs-extra/lib/fs/index.js:3:11)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
module.js:491
throw err;
^
Error: Cannot find module 'universalify'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/ubuntu/.local/share/heroku/client/node_modules/fs-extra/lib/fs/index.js:3:11)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
! error getting commands pid 14405 exit 1
Try adding this to package.json and rebuild instanses:
"universalify": "^0.1.1"
or run this command on your server and restart node.js:
npm install universalify --save
I will advice you run these on your terminal in your CWD of the preoject npm uninstall universalify -S --save, which should remove any form of universalify that probably had some missing dependencies during your npm install, after which you can then run npm install universalify --save.
Don't hesitate to comment if you encounter any further challenge.
I was also having this error last time when i'm still doing my project on node . So what i did was . Install every npm that is missing so something like this
npm install universalify --save
If it still persist. Delete the folder of the universalify and reinstall npm again :) . And don't forget to delete it also on your package.json
Related
I am trying to use the IP module in a Node program. However, whenever I try to add it in using const ip = require("ip"), I get the following error:
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module 'ip'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/Users/fin444/Desktop/node/app.js:1:207)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
Why is this happening? I have installed and reinstalled the latest version of IP several times globally on my computer, and all other Node modules work fine.
Try this:
npm uninstall ip -g --save
Then:
npm install ip -g --save
I don't know if --save is required anymore but I have had the issue that without this flag the module could not be found. Hope this helps.
I have installed node-properties-parser globally by running npm install -g node-properties-parser as normal user(vaisakh). Then i ran my test.js file with the command node test.js now it's throwing the error
Error: Cannot find module 'node-properties-parser'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/data02/bamboo/test.js:3:12)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
I ran the above npm install -g node-properties-parser as root user and run the node test.js here it's working fine. But why it's throwing the error while running as normal user?
Thanks. Finally i found the answer, it's working when in run sudo npm install node-properties-parser without the -g option. But still i don't know why the -g option is not woking, in the docs it's given as install globally.
I am starts working on expressJs nodeJs but stuck at a beginning point to run the node server.js command. I think any module is missing to install but i`m not recognize which one is missing.Im working on linux(ubuntu) operating system. Please help me to out this problem.
iron#iron-System-Product-Name:/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master$ node server.js
module.js:442
throw err;
^
Error: Cannot find module '/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master/config/env/undefined'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master/config/routes.js:6:14)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/media/iron/1d6c195f-2350-423c-a3f0-0500c92e580a/admin-panel/node-admin-master/server.js:14:13)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
Node Version: v6.2.2
Npm version: 3.9.5
it take undefined of variable which may you declare in config/env/undefined.
Please check your env file or if possible share with me .
Thanks
With the error, i suspect you are missing iron-node module.
To simply install in project, run
npm i iron-node
to install and save it in the project's package.json, run:
npm i iron-node --save
to install it in your computer, do:
npm i -g iron-node
However, since this is a development dependency, you should install it as one and save it in package.json, by:
npm i iron-node -D --save
I am using npm for quite a while now, but this morning when I run npm init I get this error :
module.js:549
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
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 /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm- cli.js:92:3)
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)
Somebody helps me!
As the error error trace that is displayed is referencing a missing path (../lib/utils/unsupported.js), I simply decided to remove nodejs and npm altogether following the answer here
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
After removing nodejs and npm I reinstall them using the node-v8.11.pkg installer.
It's npm init is now working fine.
I honestly dont even know what question I should be asking here, but npm run build fails
> color-organizer#1.0.0 build /home/francis/Desktop/react/chapter-
06/color-organizer
> webpack --progress
module.js:471
throw err;
^
Error: Cannot find module 'set-blocking'
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> (/home/francis/.nvm/versions/node/v5.0.0/lib/node_modules/webpack/node_modules/yargs/lib/usage.js:5:21)
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)
node -v gives me
v6.11.0
so its weird that i see 5 in this error log. I do need to note that i was running on 5 before, and just recently upgraded to 6.11 in the middle of this problem
i'm on ubuntu 16.04
i'm just trying to follow these examples https://github.com/MoonHighway/learning-react/ and start a server for 6, but i can't
and its pissing me off
Running npm install fixed the error for me using the latest versions. Otherwise you may try the command npm install set-blocking or npm install set-blocking --save-dev to only install the module as a developer dependency.