evshiron / nwjs-builder

https://www.npmjs.com/package/nwjs-builder
76 stars 12 forks source link

Cannot find module 'nwjs-builder' #22

Closed MaestroJurko closed 8 years ago

MaestroJurko commented 8 years ago

Tried require('nwjs-builder'); and require('evshiron/nwjs-builder');

evshiron commented 8 years ago

Please make sure the installation is successful. BTW the proper way to require is require('nwjs-builder'). Feel free to ask if you have further questions.

MaestroJurko commented 8 years ago

Installation was successful, but I see in Travis, that master was successfully tested 10min ago. Will install it again.

git://github.com/evshiron/nwjs-builder.git#b581d56af98265841ce248530ec28e61d8f5fc8c

I am still getting the same issue.

evshiron commented 8 years ago

That build failed because mocha was broken when it bumped its version to 2.5.0, and it's fixed now in 2.5.1.

MaestroJurko commented 8 years ago

Ok, then I don't know what could cause this issue. I see nwjs-builder in node_modules, but cannot access is through require.

Is this still correct way to install it: npm install evshiron/nwjs-builder -g

The node_modules folders looks like this: screen shot 2016-05-23 at 12 40 28

evshiron commented 8 years ago

No. Please read https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/. In general, a global installation means the module provides an executable. If you want to use it in your project, use local installation instead.

MaestroJurko commented 8 years ago

I installed it also locally.

evshiron commented 8 years ago

Try removing ./node_modules/node-flow/, ./node_modules/nwjs-download/ and ./node_modules/nwjs-builder/ and npm install nwjs-builder again. If the requiring still fails, please provide some console output along with the reply, which will help me discover where the problem is.

evshiron commented 8 years ago

Oh wait. Install it by npm install nwjs-builder. Not npm install evshiron/nwjs-builder, which will fetch stuff from GitHub directly. Sorry about that. It's time to update the README.

MaestroJurko commented 8 years ago

That was it, thx.