Closed davidlinse closed 8 years ago
Actually that was totally intended, but recently I'm fan of discover-and-require techniques for loading modules from local, parent or global installations. That approach allows us to put the required dependency wherever we like to... let me update nwrun
to do the same so, thanks for your feedback!
Not sure if solved but I've released a nwrun
patch for that, could you npm update
?
Hi.. I've triggered an npm update
with no change.. I've reinstalled grunt-nightwatch and the included dependency is gone..
├─┬ grunt-nightwatch@0.5.3
│ └─┬ nwrun@0.2.0
│ └── deduct@0.0.1
It works with Nightwatch as "local" dependency but still fails with Nightwatch installed globally.
regards ~david
Which version of node/npm you're using?
Can you share the output of the following command?
$ npm root -g
Sure..
$ npm root -g
info - it worked if it ends with ok
info - using yapm@2.4.2
info - using node@v0.10.28
/usr/local/lib/node_modules
info - ok
regards ~david
Seems like you're running non-standard NPM and an older version of NodeJS... I'm not sure if everything will work in your system because deduct
relies on execSync
and isn't supported for your version...
If you can test the following snippet would be great:
console.log(require('child_process').execSync('npm root -g').toString());
Update: another solution would be using npm link nightwatch
inside your project, that way you link the global dependency locally.
I'm closing this since npm link
is a good solution.
As far as i can see/tell one needs to have NightwatchJS installed as local module.
When running
$ npm list
you'll getBut having NightwatchJS installed globally or not at all will result in a error like:
'Can not find module "nightwatch" error.'
You'll need to run
$ npm install nightwatch
inside you project to get rid of this error. Is this the intended behaviour ?Best regards ~david