获得与react-dom相关的错误

时间:2015-09-05 17:35:19

标签: javascript node.js npm reactjs

我刚刚更新了我的节点和npm安装,现在运行我的项目时出现错误。我正在使用"反应":" ^ 0.13.3" " react-dom":" 0.14.0-beta3"

   npm WARN unmet dependency /Users/hilarl/Desktop/client/node_modules/react-dom requires react@'^0.14.0-beta3' but will load
    npm WARN unmet dependency /Users/hilarl/Desktop/client/node_modules/react,
    npm WARN unmet dependency which is version 0.13.3

react-dom requires react@'^0.14.0-beta3'

Error: Cannot find module 'react/lib/ReactDOMServer'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/hilarl/Desktop/client/node_modules/react-dom/server.js:1:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

无论如何使用react-dom与反应0.13.3?感谢

1 个答案:

答案 0 :(得分:5)

React 13.3已经包含了DOM内容。它叫做React.DOM。在最近的版本中,他们已经将其从核心中移除 - 为了减轻它 - 进入可选模块。