summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZara Zaimeche <zara.zaimeche@codethink.co.uk>2015-01-09 13:36:15 +0000
committerZara Zaimeche <zara.zaimeche@codethink.co.uk>2015-01-09 14:48:05 +0000
commit37dfe6a5926425af7342f77791ca49db41471879 (patch)
treeb52e99a8e3edc3536c702806d4e56eec5e6c94ff
parent1405026325c64c3e314d1cde9dfda404dc04140d (diff)
downloadimport-37dfe6a5926425af7342f77791ca49db41471879.tar.gz
Minor changes to README
-rw-r--r--README.npm21
1 files changed, 21 insertions, 0 deletions
diff --git a/README.npm b/README.npm
new file mode 100644
index 0000000..04a0ff6
--- /dev/null
+++ b/README.npm
@@ -0,0 +1,21 @@
+You need to set NODE_PATH=/usr/lib/node_modules/ to use this importer!!!!!
+eg: your command could look like:
+
+NODE_PATH=/usr/lib/node_modules/ baserock-import npm PACKAGENAME [version]
+
+The default (and strongly encouraged) behavour of npm is to install the
+modules that a program depends on inside the source tree of the project,
+in a subdirectory called 'node_modules'. The authors of npm are pretty
+against globally installing packages that other packages depend on. There
+is a 'install --global' option which seems to be only for programs that
+you want available in /usr/bin.
+
+npm's FAQ responds to the question of how to have globally installed
+packages, with "Write your own package manager, then. It´s not that hard.".
+OK! And we could have done that, but we found that by (ab)using the `npm build`
+command it's possible to get npm to install a package into
+/usr/lib/node_modules without installing its dependencies. This is consistent
+with how Baserock (and pretty much every other Linux distribution) tries
+to do things. Node.js doesn't seem to have a built-in 'look for modules here'
+path, so you'll need to set NODE_PATH=/usr/lib/node_modules when running
+programs that use the packages installed in the Baserock system.