Hi. This is a (possible) feature request (+1)
Our package has node-expat as dependency, but latest node-expat currently doesn't install on windows, since it gets a build error and fails.
npm install --force
1. to only download a package, not build (npm download node-expat)
2. or to download into cache (via npm cached add node-expat)
and then have npm extract node-expat d:\my_output_dir\
npm cached add node-expat
npm extract node-expat d:\my_output_dir\
You could specify node-expat in optionalDependencies in your package.json, so that your installation does not fail if node-expat fails to build. Would that meet your needs?
We still need the node-expat source to build one of our dependent packages. We just don't need the node-expat build stage since we use our own build script.
Either way - we have it working. Just thought that if there's more people that require "no-build" functionality, they could +1 it.
+1 to a no-build option for npm install. It is useful when you have (e.g.) a code editor and want to perform autocomplete (or other static analysis) for the user in the context of the current NPM package. There is no need to build the packages in that case.
+1 to a no-build option for npm install.
I want create a rpm package without binary
2 versions == 2 modules... just add a variable so the name could be changed only in one place
There were some discussions about different modules implementing the same api, but it has nothing to do with building.
I have a case where I need to "build" my source dir, complete with npm modules, and then archive them to be deployed to a server that doesn't have internet access. The problem is that when I put it on the new computer, I have to do npm rebuild; that's fine, and it works, but it would be a lot better if I didn't have to arbitrarily archive up a bunch of binaries that will never get used as well. I may have to find a way to manually delete all build artifacts.
Add --ignore-scripts option that causes `npm install` to not run prei…
…nstall and prepublish scripts (closes #2817)
I've submitted a PR to implement an npm install --ignore-scripts option at #3824. (Posting so that people who are subscribed to this issue get a notification.)
npm install --ignore-scripts
+1. I check my node_modules folder into git, and I need to .gitignore the build files. If I can download the module without building it, I can check that in, run npm rebuild, and put everything that shows up into .gitignore.
(Is there a better way to do this that already exists?)
To everyone watching this issue: npm 1.3.18, which incorporates #3824, was just released. It provides an --ignore-scripts flag that can be used with npm install to prevent package.json scripts from being run. I think that flag addresses this issue.
Ah right, I knew there was an issue I forgot to close!
--ignore-scripts does not satisfy the request here. Why not add a --nobuild or npm fetch option? There needs to be a way to just fetch dependencies and build them later.
You already have npm build, why no npm fetch?
I am trying to create bundled packages of some npm modules for FreeBSD Ports packages, and we explicitly need to fetch, extract, build, install in separate phases.
Could someone please either reopen this, or give a reason to reject it?
See @bdrewery's comment above
--ignore-scripts works great! Is it in the docs anywhere? I think a good keyword to have in that documentation is 'build' because I use it to isolate the part that might change if I npm rebuild in another environment.
+1 npm fetch would be useful.
My case : I need to fetch selenium-standalone but prevent its post-install script to try fetching the chrome-driver it wants : my corporate proxy blocks me.
I can retrieve the chrome-driver from other means (add "s" on the "http" in the url) and then place the content where it's supposed to be.
But here, npm refuses to let the package be if the install script fails…
--ignore-scripts does not prevent the install script to be executed BTW…
$ npm -v
$ npm i --save selenium-standalone --ignore-scripts
+1 for documenting this. Opened an issue: npm/docs#130
+1 for npm fetch.
npm pack <name>@<version> is analogous to npm fetch.
npm pack <name>@<version>