【发布时间】:2018-11-30 19:35:12
【问题描述】:
npm start
- react@16.4.1
- react-dom@16.4.1
- 反应三渲染器
App.js
import React3 from 'react-three-renderer';
import * as THREE from 'three';
import React from "react";
import ReactDOM from 'react-dom';
警告
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-three@0.9.7 requires a peer of react@^15.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-three@0.9.7 requires a peer of react-dom@^15.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-three@0.9.7 requires a peer of three@^0.83.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-three-renderer@3.2.4 requires a peer of react@~15.6.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-three-renderer@3.2.4 requires a peer of react-dom@~15.6.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-three-renderer@3.2.4 requires a peer of three@~0.86.0 but none is installed. You must install peer dependencies yourself.
节点脚本/start.js
正在启动开发服务器...
编译失败。
./node_modules/react-three-renderer/lib/React3CompositeComponentWrapper.js
Module not found: Can't resolve 'react-dom/lib/ReactCompositeComponent' in '/Users/ernekyan/react-app/project/node_modules/react-three-renderer/lib'
有人可以给我建议吗?
【问题讨论】:
-
你使用的是哪个节点版本?
-
@HridayModi v8.11.3