Disable npm cache

后端 未结 3 681
深忆病人
深忆病人 2021-02-12 20:11

Some time ago I had trouble with the npm cache on our build machines. From time to time we had to do npm cache clean by hand, and that solved various issues that we

3条回答
  •  暖寄归人
    2021-02-12 20:38

    As npm-config documented:

    force§ Default: false Type: Boolean Makes various commands more forceful.

    1. lifecycle script failure does not block progress.
    2. publishing clobbers previously published versions.
    3. skips cache when requesting from the registry.
    4. prevents checks against clobbering non-npm files.

    Maybe use -f / --force is the simplest way to disable npm cache.

    npm install --force
    

提交回复
热议问题