Is there a way to get npm to unbuild all the modules under node_modules? Something like npm rebuild that removes all build artifacts but doesn't rebuild them?
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- google-drive can't get push notifications
- Failed at the electron@1.8.2 postinstall script
- How to reimport module with ES6 import
- Webpack getting started, import error
相关文章
- node连接远程oracle报错
- How can make folder with Firebase Cloud Functions
- @angular-cli install fails with deprecated request
- node.js modify file data stream?
- How to resolve hostname to an ip address in node j
- Transactionally writing files in Node.js
- Log to node console or debug during webpack build
- Get file created date in node
You can take advantage of the 'npm cache' command which downloads the package tarball and unpacks it into the npm cache directory.
The source can then be copied in.
Using ideas gleaned from https://groups.google.com/forum/?fromgroups=#!topic/npm-/mwLuZZkHkfU I came up with the following node script. No warranties, YMMV, etcetera.
You can just delete the node_module directory
I added this to my package.json:
Seems to work well.
In a word no.
In two, not yet.
There is, however, an open issue for a
--no-build
flag tonpm install
to perform an installation without building, which could be used to do what you're asking.See this open issue.