Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples don't build #18

Closed
tstelzer opened this issue Mar 12, 2019 · 9 comments
Closed

Examples don't build #18

tstelzer opened this issue Mar 12, 2019 · 9 comments

Comments

@tstelzer
Copy link

Steps:

  1. git clone https://github.com/drcmda/react-three-fiber.git
  2. cd react-three-fiber/examples
  3. yarn or npm install
  4. yarn start or npm start

Expected: Successful webpack output.

Actual

✖ 「wdm」:
ERROR in ./components/Tina.js
Module not found: Error: Can't resolve 'lodash-es/flatten' in '/home/tstelzer/dev/source/react-three-fiber/examples/components'
 @ ./components/Tina.js 5:0-37 24:51-55
 @ ./index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 index.js

ERROR in ./components/Tina.js
Module not found: Error: Can't resolve 'three/src/Three' in '/home/tstelzer/dev/source/react-three-fiber/examples/components'
 @ ./components/Tina.js 1:0-41 10:12-22 89:10-26
 @ ./index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 index.js

ERROR in ./node_modules/react-spring/three.js
Module not found: Error: Can't resolve 'three/src/Three' in '/home/tstelzer/dev/source/react-three-fiber/examples/node_modules/react-spring'
 @ ./node_modules/react-spring/three.js 1:0-41 1827:31-36
 @ ./components/Tina.js
 @ ./index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 index.js

ERROR in ./resources/loaders/SVGLoader.js
Module not found: Error: Can't resolve 'three/src/Three' in '/home/tstelzer/dev/source/react-three-fiber/examples/resources/loaders'
 @ ./resources/loaders/SVGLoader.js 1:0-112 9:51-72 16:21-31 96:21-30 98:22-29 99:24-31 100:27-34 482:21-30 519:21-30 542:21-30 554:24-28 556:21-30 567:24-28 569:21-30 580:21-30 646:26-33 749:23-30 750:23-30 806:29-36 807:29-36 808:29-36 809:29-36 810:31-38
 @ ./components/Tina.js
 @ ./index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 index.js

ERROR in ../src/canvas.js
Module not found: Error: Can't resolve 'three/src/Three' in '/home/tstelzer/dev/source/react-three-fiber/src'
 @ ../src/canvas.js 3:0-41 40:41-56 41:37-50 43:20-43 60:28-41 62:18-28 99:27-46 108:30-41
 @ ../index.js
 @ ./components/Tina.js
 @ ./index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 index.js

ERROR in ../src/reconciler.js
Module not found: Error: Can't resolve 'three/src/Three' in '/home/tstelzer/dev/source/react-three-fiber/src'
 @ ../src/reconciler.js 1:0-41 85:38-43
 @ ../index.js
 @ ./components/Tina.js
 @ ./index.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 index.js
ℹ 「wdm」: Failed to compile.

@drcmda
Copy link
Member

drcmda commented Mar 12, 2019

i think you're missing a yarn in the main directory. it's using webpack aliases to go back to the main dir. could you try that?

@tstelzer
Copy link
Author

Same result with:

  1. git clone https://github.com/drcmda/react-three-fiber.git
  2. cd react-three-fiber
  3. yarn
  4. cd examples
  5. yarn
  6. yarn start

@drcmda
Copy link
Member

drcmda commented Mar 12, 2019

oh, i see it. misses dependencies for three in package json, im fixing it.

@drcmda
Copy link
Member

drcmda commented Mar 12, 2019

Now it should work.

@tstelzer
Copy link
Author

Yup, works!

@OlivierPicot2
Copy link

Sorry. It does not work. Ive tried 2 methods:

npm install react-three-fiber
git clone

ERROR in ./components/Lines.js
Module not found: Error: Can't resolve 'react-three-fiber' in '/home/olivier/wsstorm/react-three-fiber/examples/components'
@ ./components/Lines.js 5:0-72 7:0-6 117:6-14 135:29-35
@ ./index.js
ℹ 「wdm」: Failed to compile.

Do i something wrong ...

drcmda added a commit that referenced this issue Jun 7, 2019
@drcmda
Copy link
Member

drcmda commented Jun 7, 2019

index.js was renamed to index.ts recently. it's fixed now

@OlivierPicot2
Copy link

Thank for you bundle and your quick reaction.
Bets Regards

@sergeysatori
Copy link

sergeysatori commented Aug 17, 2019

can't build with nodejs v8.10.0
is there a nodejs version preferred? if this affects should be considered to add that info for example in package.json engine attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants