R
R
rumkin2011-07-05 00:37:22
Node.js
rumkin, 2011-07-05 00:37:22

Node.js and Hard Drive Partitions

Formulation of the problem


Has anyone experienced that node.js does not see installed packages if the application is launched from a different partition.

visually


File in root section 1 ~/app.js:
mongoose = require('mongoose'); // works fine!


File on another partition /media/otherpartition/app.js:
mongoose = require('mongoose'); // module not found!

Or does it need to be specified in npm. By the way, does he have a config after the installation?

System requirements


Ubuntu 11.04



1 - I hope I'm calling it correctly.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladislav, 2011-07-05
@click0

Just check it out/app.js

F
Fedor Indutny, 2011-07-05
@donnerjack13589

I have several partitions - and everything works fine.
You may not have had a node_modules folder on the second partition.

M
Melanitsky, 2011-07-05
@Melanitsky

try adding library directories
require.paths.push('/media/otherpartition');
require.paths.push(__dirname+'/library');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question