0
我已經拉下了最新的ubuntu docker鏡像,並且我已經在鏡像上安裝了node,npm等。我正在嘗試在我的項目上執行npm install
。我不斷收到3個這樣的錯誤。我只會首次顯示它。使用docker時npm安裝接收類型錯誤
path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^
TypeError: Path must be a string. Received { url: 'https://raw.github.com/imagemin/pngquant-bin/v0.3.5/vendor/linux/x64/pngquant',
name: 'pngquant',
os: 'linux',
arch: 'x64' }
at assertPath (path.js:7:11)
at Object.basename (path.js:1357:5)
at /MyProject/WebContent/node_modules/download/index.js:35:43
at each (/MyProject/WebContent/node_modules/download/node_modules/each-async/each-async.js:63:4)
at module.exports (/MyProject/WebContent/node_modules/download/index.js:33:5)
at /MyProject/WebContent/node_modules/bin-wrapper/index.js:108:20
at /MyProject/WebContent/node_modules/bin-wrapper/index.js:141:24
at /MyProject/WebContent/node_modules/bin-check/index.js:30:20
at /MyProject/WebContent/node_modules/executable/index.js:39:20
at FSReqWrap.oncomplete (fs.js:117:15)
所以,當我去了之後我npm install
的gulp build
將無法做gulp build
。但是,即使我得到這些類型錯誤,npm install
「成功」。
有一點是值得注意的,我沒有這個配置添加到我的搬運工圖像:git config --global url."https://".insteadOf git://
一對夫婦的更多注意事項:
- 這工作對我的本地機器Mac或Windows。
- 節點-v V6.2.2 NPM -v 3.9.5