鍍金池/ 問答/Linux/ NPM 出錯(cuò),vonic下載的

NPM 出錯(cuò),vonic下載的

package.json:

{
  "name": "vonic",
  "version": "2.0.0-beta.19",
  "main": "dist/vonic.min.js",
  "description": "Mobile UI Components, based on Vue.js and ionic CSS.",
  "keywords": [
    "vonic",
    "vonic framework",
    "vue",
    "ionic",
    "app",
    "mobile",
    "components",
    "ui components",
    "spa"
  ],
  "author": "wangdahoo <157195705@qq.com>",
  "license": "MIT",
  "scripts": {
    "dev": "cross-env NODE_ENV=development webpack-dev-server --inline --hot --host 0.0.0.0 --port 8081",
    "doc": "BUILD=doc node build.js",
    "build": "node build.js"
  },
  "dependencies": {
    "axios": "^0.15.3",
    "es6-promise": "^4.0.5",
    "fastclick": "^1.0.6",
    "object-assign": "^4.1.1",
    "storage-js-iso": "^0.2.0",
    "vswipe": "1.0.1",
    "vue": "^2.2.6",
    "vue-router": "^2.3.0",
    "vue-scroller": "2.2.0"
  },
  "devDependencies": {
    "babel-core": "^6.0.0",
    "babel-loader": "^6.0.0",
    "babel-preset-es2015": "^6.0.0",
    "chalk": "^1.1.3",
    "cross-env": "^3.0.0",
    "css-loader": "^0.25.0",
    "extract-text-webpack-plugin": "^2.1.0",
    "file-loader": "^0.9.0",
    "html-webpack-plugin": "^2.28.0",
    "moment": "^2.17.1",
    "node-sass": "^3.9.3",
    "optimize-css-assets-webpack-plugin": "^1.3.0",
    "ora": "^1.1.0",
    "sass-loader": "^4.0.2",
    "style-loader": "^0.13.1",
    "url-loader": "^0.5.7",
    "vue-loader": "^11.0.0",
    "vue-template-compiler": "^2.2.6",
    "webpack": "^2.2.0",
    "webpack-dev-server": "^2.3.0"
  }
}

cnpm install 如下:

PS C:\Users\本地網(wǎng)\Desktop\vue\vonic-master> cnpm install
\ [26/29] Installing wbuf@^1.1.0platform unsupported babel-loader@6.4.1 ? webpack@2.7.0 ? watchpack@1.4.0 ? chokidar@1.7.0 ? fsevents@^1.0.0 Package require os(darwin) not compatible with your platform(win32)
[fsevents@^1.0.0] optional install error: Package require os(darwin) not compatible with your platform(win32)
√ Installed 29 packages
√ Linked 693 latest versions
Downloading binary from https://npm.taobao.org/mirrors/node-sass/v3.13.1/win32-x64-57_binding.node
Cannot download "https://npm.taobao.org/mirrors/node-sass/v3.13.1/win32-x64-57_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080
Building: C:\Program Files\nodejs\node.exe C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_node-gyp@3.6.2@node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_node-gyp@3.6.2@node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.6.2
gyp info using node@8.9.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb download using dist-url https://npm.taobao.org/mirrors/node
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:80:29)
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:89:16
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:80:29)
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:89:16
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:13:12)\n    at F (C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:68:19)\n    at E (C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:80:29)\n    at C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:89:16\n    at C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_isexe@2.0.0@isexe\\index.js:42:5\n    at C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_isexe@2.0.0@isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:80:29)
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:89:16
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:80:29)
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_which@1.3.0@which\which.js:89:16
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_isexe@2.0.0@isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python\n    at getNotFoundError (C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:13:12)\n    at F (C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:68:19)\n    at E (C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:80:29)\n    at C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_which@1.3.0@which\\which.js:89:16\n    at C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_isexe@2.0.0@isexe\\index.js:42:5\n    at C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_isexe@2.0.0@isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_node-gyp@3.6.2@node-gyp\lib\configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_node-gyp@3.6.2@node-gyp\lib\configure.js:508:16)
gyp ERR! stack     at C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_graceful-fs@4.1.11@graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\本地網(wǎng)\\Desktop\\vue\\vonic-master\\node_modules\\_node-gyp@3.6.2@node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\本地網(wǎng)\Desktop\vue\vonic-master\node_modules\_node-sass@3.13.1@node-sass
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
× Install fail! Error: post install error, please remove node_modules before retry!
Run "C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
Error: post install error, please remove node_modules before retry!
Run "C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
    at ChildProcess.proc.on.code (C:\Users\本地網(wǎng)\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:74:21)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
npminstall version: 3.2.1
npminstall args: C:\Program Files\nodejs\node.exe C:\Users\本地網(wǎng)\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --china --userconfig=C:\Users\本地網(wǎng)\.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=http://registry.npm.taobao.org
PS C:\Users\本地網(wǎng)\Desktop\vue\vonic-master>

https://github.com/wangdahoo/...
我是直接下載使用的
clipboard.png

回答
編輯回答
默念
Downloading binary from https://npm.taobao.org/mirrors/node-sass/v3.13.1/win32-x64-57_binding.node
Cannot download "https://npm.taobao.org/mirrors/node-sass/v3.13.1/win32-x64-57_binding.node":

HTTP error 404 Not Found

錯(cuò)誤在這里,node-sass安裝包url找不到了,建議不要用cnpm,直接用npmyarn

2018年4月17日 00:18