Can't find module rejoice
I'm trying to implement rejoice but I'm having a problem.
I got a manifest file called ./config.json.
I'm calling node rejoice -c config.json and getting
Error: Cannot find module 'D:\Projects\metaphor\rejoice'
I thought maybe it couldn't find node_modules so I tried
node rejoice -c config.json -p /node_modules but that didn't work either.
So what am I doing wrong? :)
Is this your first time trying it or did this just break? Have you tried using the full path for your modules? Where do you have rejoice installed? (Is it D:\Projects\metaphor\node_modules? What directory are you starting it from?
There isn't quite enough information here to help.
node doesn't work like that, it's waiting for a path here, not a module name. The only way this syntax is possible is if you installed rejoice globally (npm install -g). You can either do node ./node_modules/.bin/rejoice or put the same line in the start script of your package.json and do npm start.
Alright, I'll try and answer your questions!
Yes, first time using it.
Fullpath? As in all the way from 'D:/`? That would feel weird, wouldn't it?
Rejoice is installed as a project dependency ( so /node_modules, not globally. Did try globally as well though, same result).
I'm starting it from D:/projects/metaphor.
Running the same line through npm start does not work either.
If you need more info just let me know!
Tried with a full path to the node modules folder as well, from package.json,
"start": "node rejoice -c config.json -p D:/projects/metaphor/node_modules",
Same error.
And without the -p ?
The same.
Can you put in a gist what tree outputs ?
tree output,
https://gist.github.com/johanalkstal/00b64e5b9c554b64b9b0
Oh sorry, can you do that again with tree /F ?
Updated.
Ah think I found out why, remove node from that line in start, simply rejoice -c config.json.
Oh great! The devil is always in the details. :D
Thanks for your time and patience. :)