无法为反应版本v0.13.x安装react-dom

问题描述 投票:0回答:1

当我尝试运行命令npm install react react-dom时,我收到以下错误

    npm install react react-dom
    - [email protected] node_modules/base62
    - [email protected] node_modules/jstransform/node_modules/esprima-fb
    - [email protected] node_modules/jstransform/node_modules/object-assign
    - [email protected] node_modules/jstransform/node_modules/source-map
    - [email protected] node_modules/jstransform
    - [email protected] node_modules/envify
    /prd/dir/UI
    ├─┬ UNMET PEER DEPENDENCY [email protected]
    │ └── [email protected] 
    └─┬ UNMET PEER DEPENDENCY [email protected]
      └── [email protected] 

    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: [email protected]
    npm WARN enoent ENOENT: no such file or directory, open         '/prd/dir/UI/package.json'
    npm WARN [email protected] requires a peer of [email protected] || 15.x but none was installed.
    npm WARN [email protected] requires a peer of [email protected] || 15.x but none was installed.
    npm WARN [email protected] requires a peer of react@>=0.12.2 <0.15.0 but none was installed.
    npm WARN UI No description
    npm WARN UI No repository field.
    npm WARN UI No README data
    npm WARN UI No license field.
    npm ERR! code 1

以下是我的开发依赖项:

     "devDependencies": {
        "babel-core": "^5.8.25",
        "babelify": "^6.1.x",
        "browser-sync": "^2.7.13",
        "browserify": "^10.2.6",
        "debowerify": "^1.3.1",
        "del": "^1.2.0",
        "eslint-plugin-react": "^3.6.3",
        "gulp": "^3.9.0",
        "gulp-autoprefixer": "^2.3.1",
        "gulp-if": "^1.2.5",
        "gulp-imagemin": "^2.3.0",
        "gulp-notify": "^2.2.0",
        "gulp-rename": "^1.2.2",
        "gulp-sass": "^2.0.x",
        "gulp-sourcemaps": "^1.5.2",
        "gulp-streamify": "0.0.5",
        "gulp-uglify": "^1.2.0",
        "gulp-util": "^3.0.6",
        "history": "^1.12.5",
        "humps": "^0.6.0",
        "lodash": "^3.10.0",
        "react": "^0.13.x",
        "react-document-title": "^1.0.2",
        "react-router": "^1.0.0-rc1",
        "reflux": "^0.2.9",
        "run-sequence": "^1.1.1",
        "superagent": "^1.2.0",
        "vinyl-source-stream": "^1.1.0",
        "watchify": "^3.2.x"
      }
node.js reactjs react-dom
1个回答
1
投票

为了安装特定版本的npm软件包,你可以在最后提到版本

npm install -S [email protected]

但是,我强烈建议您使用最新版本。此外,React-DOM仅作为单独的软件包从0.14.0版本创建,因此在此之前不需要。检查此答案react vs react DOM confusion

© www.soinside.com 2019 - 2024. All rights reserved.