离子标签模板Npm安装错误

时间:2018-03-02 07:06:24

标签: ionic-framework npm ionic3

我正在尝试使用离子cli安装Ionic选项卡模板。我跑的时候

  

离子启动newApp标签

,我正在运行npm install时收到以下错误,我不确定哪个依赖项版本导致了这个问题。目前tiny-lr npm版本为1.1.1。不知道为什么1.0.5会抛出错误。有人可以帮我这个吗?对此的任何帮助都是非常赞赏的。下面是我的package.json和错误日志。

{
  "name": "design",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/core": "4.4.0",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic/storage": "2.1.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "typescript": "2.4.2"
  },
  "description": "An Ionic project"
}

错误日志:

1676 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
1677 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
1678 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
1678 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
1678 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
1678 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
1679 verbose stack Error: 404 Not Found: tiny-lr@^1.0.5
1679 verbose stack     at fetch.then.res (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
1679 verbose stack     at tryCatcher (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
1679 verbose stack     at Promise._settlePromiseFromHandler (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
1679 verbose stack     at Promise._settlePromise (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
1679 verbose stack     at Promise._settlePromise0 (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
1679 verbose stack     at Promise._settlePromises (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
1679 verbose stack     at Async._drainQueue (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
1679 verbose stack     at Async._drainQueues (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
1679 verbose stack     at Immediate.Async.drainQueues (C:\Users\sathees\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
1679 verbose stack     at runCallback (timers.js:672:20)
1679 verbose stack     at tryOnImmediate (timers.js:645:5)
1679 verbose stack     at processImmediate [as _immediateCallback] (timers.js:617:5)
1680 verbose cwd C:\sathees\design
1681 verbose Windows_NT 10.0.15063
1682 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sathees\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "i"
1683 verbose node v6.11.3
1684 verbose npm  v5.6.0
1685 error code E404
1686 error 404 Not Found: tiny-lr@^1.0.5
1687 verbose exit [ 1, true ]

1 个答案:

答案 0 :(得分:1)

问题是我的npm注册表配置。我把它设置到我的公司注册表中,并且没有tiny-lr。将其设置为

  

npm set registry https://registry.npmjs.org/

解决了这个问题。