node-lessons icon indicating copy to clipboard operation
node-lessons copied to clipboard

Error: Cache dir is required

Open santong opened this issue 8 years ago • 3 comments

新手请教下使用npm命令的时候出现这个错误怎么解决 google了一下没有找到答案,具体报错信息

Error: Cache dir is required at CachingRegistryClient.RegClient (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/index.js:50:33) at new CachingRegistryClient (/usr/local/lib/node_modules/npm/lib/cache/caching-client.js:20:18) at /usr/local/lib/node_modules/npm/lib/npm.js:362:22 at /usr/local/lib/node_modules/npm/lib/config/core.js:82:7 at Array.forEach (native) at /usr/local/lib/node_modules/npm/lib/config/core.js:81:13 at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:16:25) at finalize (/usr/local/lib/node_modules/npm/lib/config/core.js:200:5) at Conf.afterCARead (/usr/local/lib/node_modules/npm/lib/config/load-cafile.js:15:40) at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:76:16 npm ERR! Darwin 15.5.0 npm ERR! argv "node" "/usr/local/bin/npm" npm ERR! node v0.10.36 npm ERR! npm v1.3.14

santong avatar Jun 11 '16 10:06 santong

请附上你的npm 命令

steve-wanglin avatar Jun 12 '16 09:06 steve-wanglin

@steve-wanglin 现在解决了,我是使用curl -L https://www.npmjs.org/install.sh | sh重新安装后解决了。

但是之前使用任何命令都会出现上面的错误,比如: npm init, npm cache clean等等都会报上面的错误,不知道是为什么

santong avatar Jun 12 '16 14:06 santong

请问,如何用gulp把requirejs里面所有的js,压缩打包成一个js?

xiaojiandong avatar Jun 20 '16 01:06 xiaojiandong