1
npm start
  • react@16.4.1
  • react-dom@16.4.1
  • react-three-renderer

App.js

import React3 from 'react-three-renderer';
import * as THREE from 'three';
import React from "react";
import ReactDOM from 'react-dom';

Warnings

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.

node scripts/start.js

Starting the development server...

Failed to compile.

./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'

Can someone give me advice?

ernekyan
  • 31
  • 1
  • 9

1 Answers1

1

You could try npm install again to see if all packages are installed.

Othwerwise you could look at adding the packages yourself by running npm install <package> -D (automatically saved to package.json)

Or look at the provided solution here: npm WARN ... requires a peer of ... but none is installed. You must install peer dependencies yourself as auto installing peerDependencies was removed from npm v3+.

More information: https://github.com/npm/npm/releases/tag/v3.0.0

#6930 (#6565) peerDependencies no longer cause anything to be implicitly installed. Instead, npm will now warn if a packages peerDependencies are missing, but it's up to the consumer of the module (i.e. you) to ensure the peers get installed / are included in package.json as direct dependencies or devDependencies of your package.

Sanders
  • 261
  • 2
  • 7
  • Please also the other provided solution (link). As you can see in the NPM changelog you are now in control of installing peerDependencies. You would for example need to install add ajv@^6.0.0 to your package.json (or call npm install ajv@6.0.0). Same goes for three (three@~0.86.0), react (react@~15.6.1) and react-dom (react-dom@~15.6.1). – Sanders Jun 21 '18 at 13:59