rejoice icon indicating copy to clipboard operation
rejoice copied to clipboard

Can't find module rejoice

Open johanalkstal opened this issue 11 years ago • 12 comments

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? :)

johanalkstal avatar Sep 10 '15 19:09 johanalkstal

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.

lloydbenson avatar Sep 11 '15 01:09 lloydbenson

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.

Marsup avatar Sep 11 '15 05:09 Marsup

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!

johanalkstal avatar Sep 11 '15 06:09 johanalkstal

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.

johanalkstal avatar Sep 11 '15 06:09 johanalkstal

And without the -p ?

Marsup avatar Sep 11 '15 06:09 Marsup

The same.

johanalkstal avatar Sep 11 '15 06:09 johanalkstal

Can you put in a gist what tree outputs ?

Marsup avatar Sep 11 '15 06:09 Marsup

tree output, https://gist.github.com/johanalkstal/00b64e5b9c554b64b9b0

johanalkstal avatar Sep 11 '15 06:09 johanalkstal

Oh sorry, can you do that again with tree /F ?

Marsup avatar Sep 11 '15 06:09 Marsup

Updated.

johanalkstal avatar Sep 11 '15 06:09 johanalkstal

Ah think I found out why, remove node from that line in start, simply rejoice -c config.json.

Marsup avatar Sep 11 '15 06:09 Marsup

Oh great! The devil is always in the details. :D

Thanks for your time and patience. :)

johanalkstal avatar Sep 11 '15 06:09 johanalkstal