为什么我的 NPM 缓存文件夹在 ./false/_cacache 中?
Why is my NPM cache folder in ./false/_cacache?
我正在使用 Docker、PhpStorm、VS Code 进行 NPM 项目,并在本地运行并通过 Docker。
这个文件夹是在什么情况下放入./false/
?过去有没有人遇到过这种情况并会分享他们的发现?
project-root-dir
|__ false
|__ _cacache
|__ <hash>
|__ node_modules
|__ Dockerfile
|__ main.js
|__ package.json
我怀疑这一行是在 false
:
中创建文件夹 _cacache
文件夹
FROM node:12
# ...
# Some directory is missing at this point and results in `false` ?
RUN npm install -g npm
这是因为 cache
的 NPM 配置已在某处设置为 false
。您可能希望禁用缓存,但 cache
需要 字符串 ,即缓存目录的路径。
在这种情况下,这是因为您 运行 和 --no-cache
;您作为 --no-<name>
传递的任何内容都会将 <name>
的配置设置为 false
。
我正在使用 Docker、PhpStorm、VS Code 进行 NPM 项目,并在本地运行并通过 Docker。
这个文件夹是在什么情况下放入./false/
?过去有没有人遇到过这种情况并会分享他们的发现?
project-root-dir
|__ false
|__ _cacache
|__ <hash>
|__ node_modules
|__ Dockerfile
|__ main.js
|__ package.json
我怀疑这一行是在 false
:
_cacache
文件夹
FROM node:12
# ...
# Some directory is missing at this point and results in `false` ?
RUN npm install -g npm
这是因为 cache
的 NPM 配置已在某处设置为 false
。您可能希望禁用缓存,但 cache
需要 字符串 ,即缓存目录的路径。
在这种情况下,这是因为您 运行 和 --no-cache
;您作为 --no-<name>
传递的任何内容都会将 <name>
的配置设置为 false
。