npm install不返回pinkie-promise的有效版本

时间:2018-01-06 20:54:50

标签: javascript json node.js

我正在尝试做一个非常简单的" npm install"从发现的here

教程中发现的一个回购

package.json如下:

{
  "name": "react-playlist",
  "version": "1.0.0",
  "description": "A simple react to-do list",
  "main": "index.js",
  "scripts": {
  "test": "echo \"Error: no test specified\" && exit 1",
  "start": "npm run build",
  "build": "webpack -d && webpack-dev-server --content-base src/ --inline --
   hot --port 1234 --history-api-fallback"
 },
 "repository": {
    "type": "git",
    "url": "git+https://github.com/iamshaunjp/react-playlist.git"
  },
  "keywords": [
    "react"
  ],
  "author": "The Net Ninja",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/iamshaunjp/react-playlist/issues"
  },
  "homepage": "https://github.com/iamshaunjp/react-playlist#readme",
  "dependencies": {
    "react": "^15.3.2",
    "react-dom": "^15.3.2",
    "react-router": "^3.0.0"
  },
  "devDependencies": {
    "babel-core": "^6.16.0",
    "babel-loader": "^6.2.5",
    "babel-preset-es2015": "^6.16.0",
    "babel-preset-react": "^6.16.0",
    "css-loader": "^0.25.0",
    "style-loader": "^0.13.1",
    "webpack": "^1.13.2",
    "webpack-dev-server": "^1.16.1"
  }
}

当我运行" npm install"时,我收到一个关于&#34的错误;没有有效的版本可用于pinkie-promise"。我在npm上看了一下,看来pinkie-promise已被弃用并删除了。如果它甚至不显示在我的package.json中,如何将其删除?

以下是此错误的npm日志(仅包含错误的位):

1281 silly resolveWithNewModule commondir@1.0.1 checking installable status
1282 silly pacote range manifest for pkg-dir@^1.0.0 fetched in 3ms
1283 silly resolveWithNewModule pkg-dir@1.0.0 checking installable status
1284 silly pacote range manifest for find-up@^1.0.0 fetched in 2ms
1285 silly resolveWithNewModule find-up@1.1.2 checking installable status
1286 silly fetchPackageMetaData error for pinkie-promise@^2.0.0 No valid 
versions available for pinkie-promise
1287 silly pacote range manifest for path-exists@^2.0.0 fetched in 4ms
1288 silly resolveWithNewModule path-exists@2.1.0 checking installable status
1289 verbose type range
1290 verbose stack pinkie-promise: No valid versions available for pinkie-
promise
1290 verbose stack     at pickManifest 
(/usr/local/lib/node_modules/npm/node_modules/pacote/node_modules/npm-pick-
manifest/index.js:19:11)
1290 verbose stack     at fetchPackument.then.packument 
1290 verbose stack     at tryCatcher 
 at runCallback (timers.js:800:20)
1290 verbose stack     at tryOnImmediate (timers.js:762:5)
1290 verbose stack     at processImmediate [as _immediateCallback] 
(timers.js:733:5)
1291 verbose cwd /root/Desktop/LeagueSystemWebApp
1292 verbose Linux 4.4.0-104-generic
1293 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
1294 verbose node v9.2.1
1295 verbose npm  v5.5.1
1296 error code ENOVERSIONS
1297 error No valid versions available for pinkie-promise
1298 verbose exit [ 1, true ]

2 个答案:

答案 0 :(得分:6)

通过指向他们的github repo来解决这个问题.npm install pinkie-promise。

npm install https://github.com/floatdrop/pinkie-promise.git

答案 1 :(得分:5)