我尝试将Levarel Mix安装到我的项目中,但是npm安装因以下错误失败:
npm install laravel-mix --save-dev
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://localhost:14313/project=346b5007d052e/laravel-mix failed, reason: getaddrinfo ENOTFOUND localhost localhost:14313
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/../.npm/_logs/2018-10-02T07_34_43_016Z-debug.log
我检查了日志文件:
0 info it worked if it ends with ok
1 verbose cli [ '/Users/zoltangero/.nvm/versions/node/v8.11.1/bin/node',
1 verbose cli '/Users/zoltangero/.nvm/versions/node/v8.11.1/bin/npm',
1 verbose cli 'install',
1 verbose cli 'laravel-mix',
1 verbose cli '--save-dev' ]
2 info using npm@5.6.0
3 info using node@v8.11.1
4 verbose npm-session c50d296f955e3812
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for laravel-mix@latest request to http://localhost:14313/project=346b5007d052e/laravel-mix failed, reason: getaddrinfo ENOTFOUND localhost localhost:14313
8 verbose type system
9 verbose stack FetchError: request to http://localhost:14313/project=346b5007d052e/laravel-mix failed, reason: getaddrinfo ENOTFOUND localhost localhost:14313
9 verbose stack at ClientRequest.req.on.err (/Users/zoltangero/.nvm/versions/node/v8.11.1/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js:68:14)
9 verbose stack at emitOne (events.js:116:13)
9 verbose stack at ClientRequest.emit (events.js:211:7)
9 verbose stack at Socket.socketErrorListener (_http_client.js:387:9)
9 verbose stack at emitOne (events.js:116:13)
9 verbose stack at Socket.emit (events.js:211:7)
9 verbose stack at emitErrorNT (internal/streams/destroy.js:64:8)
9 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11)
9 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9)
10 verbose cwd /Users/zoltangero/sites/lillicoco-shopify-store/theme_export__www-lillicoco-com-development-t-m-canopy__25SEP2018-1037am
11 verbose Darwin 17.7.0
12 verbose argv "/Users/zoltangero/.nvm/versions/node/v8.11.1/bin/node" "/Users/zoltangero/.nvm/versions/node/v8.11.1/bin/npm" "install" "laravel-mix" "--save-dev"
13 verbose node v8.11.1
14 verbose npm v5.6.0
15 error code ENOTFOUND
16 error errno ENOTFOUND
17 error network request to http://localhost:14313/project=346b5007d052e/laravel-mix failed, reason: getaddrinfo ENOTFOUND localhost localhost:14313
18 error network This is a problem related to network connectivity.
18 error network In most cases you are behind a proxy or have bad network settings.
18 error network
18 error network If you are behind a proxy, please make sure that the
18 error network 'proxy' config is set properly. See: 'npm help config'
19 verbose exit [ 1, true ]
这是我在MacOS Sierra上的“网络/代理”设置下看到的内容: * .local,169.254 / 16
该如何解决?谢谢