Closed dangmai closed 12 years ago
Hmm, what you described should work -- it is what I explicitly designed for. However, I have not tried it extensively on Windows. What version of Windows and node are you using? I suggest node 0.8.x.
I'm using Windows 7 x64, node 0.8.2 and volo 0.2.3, here's pretty much the exact steps that I took to reproduce this:
npm install -g volo
volo create fast
cd fast
npm install volo-appcache
Then I go into volofile and add
appcache: require('volo-appcache')({
depends: ['build'],
dir: 'www-built',
htmlPath: 'index.html',
manifestTemplate: ''
})
Afterwards
volo appcache
complains about Cannot find module 'volo-appcache'
But if I do
npm install volo
node node_modules/volo/bin/volo appcache
then everything works.
This was a problem in the default project template for volo create
-- it was using the "old format" for the volofile, which does not work with npm-installed local dependencies.
I updated the project template now and it works. Thanks for pointing out this problem!
I have a project structure that looks roughly like this: Project |-node_modules |-tools |-www |-www-built |-package.json |-volofile
If I install volo by
npm install -g volo
and in the project'svolofile
Irequire('volo-appcache')
which is installed bynpm install volo-appcache
, thenvolo appcache
complains about not finding the volo-appcache module. If, however, I install volo bynpm install volo
and donode ./node_modules/volo/bin/volo appcache
, then the module is found correctly. I'd rather not do the second command as it's longer. Is there a way for globally-installed volo to look for locally installed modules then?EDIT: I'm using Windows if that's any help