Cannot find module 'tiny-lr'
puckey opened this issue · 7 comments
I published the new version to NPM and now get the following error when starting up:
No site directory provided. Serving example site:
module.js:340
throw err;
^
Error: Cannot find module 'tiny-lr'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/woods/lib/liveReload.js:7:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Did you maybe install with npm --production but are running node with NODE_ENV not set to production?
But you're right, this case should be handled better.
Hmm no - I installed with 'npm install -g woods'.. no NODE_ENV set
I am not sure 'tiny-lr' should go into devDependencies, as it is not installed when you do 'npm install -g woods'..
https://www.npmjs.org/doc/cli/npm-install.html: 'If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use.'
Ah, are you maybe running an old node version on the server? Previous
version of npm didn't install the dev dependencies by default.
On Fri, Apr 11, 2014 at 5:42 PM, Jonathan Puckey
notifications@github.comwrote:
I am not sure 'tiny-lr' should go into devDependencies, as it is not
installed when you do 'npm install -g woods'..https://www.npmjs.org/doc/cli/npm-install.html: 'If someone is planning
on downloading and using your module in their program, then they probably
don't want or need to download and build the external test or documentation
framework that you use.'Reply to this email directly or view it on GitHubhttps://github.com//issues/33#issuecomment-40217946
.
I am running Node v0.10.26
I don't think any version of NPM installs dev dependencies by default.. Only when you NPM install a local directory does that happen.. Or am I mistaken?
'If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use.
In this case, it's best to list these additional items in a devDependencies hash.
These things will be installed when doing npm link or npm install from the root of a package, and can be managed like any other npm configuration param. See npm-config(7) for more on the topic.'
i.e. dev dependencies are not installed when doing 'npm install -g woods', since it is not being install from the root of the woods directory