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

Support for React 17 #54

Closed
freddy311082 opened this issue Oct 28, 2020 · 11 comments
Closed

Support for React 17 #54

freddy311082 opened this issue Oct 28, 2020 · 11 comments

Comments

@freddy311082
Copy link

Is there any plan to support React 17? Cause I was trying to start a project to use Flume and I got the following error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: notifier@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from flume@0.6.1
npm ERR! node_modules/flume
npm ERR!   flume@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/freddy/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/freddy/.npm/_logs/2020-10-28T01_51_43_083Z-debug.log```
@chrisjpatty
Copy link
Owner

chrisjpatty commented Oct 28, 2020

@freddy311082 As far as I'm aware it should support React 17. Do you have a public repo you could post? I have a project running React 17 that runs it with no problem. I wonder are you by chance using a build system with more strict peer dependencies or something like that?

@freddy311082
Copy link
Author

freddy311082 commented Oct 28, 2020

@chrisjpatty thanks for your answer. Are you using typescript in your project? Sorry if I cannot, I'm new at using Flume

@chrisjpatty
Copy link
Owner

@freddy311082 I'm not using typescript, but I just spun up a new create-react-app with typescript and noImplicitAny disabled, and it's working fine on my end. Without knowing more about your project setup, I suspect there's an unrelated problem going on, but I can't know for sure. By the way, there's working being done right now to add Typescript types to Flume so it's a little easier to use out of the box. #43

@freddy311082
Copy link
Author

Nice... it was a local issue. I just updated node and everything worked as expected even enabling typescript. Thanks @chrisjpatty

@chrisjpatty
Copy link
Owner

@freddy311082 Great to hear!

@freddy311082 freddy311082 reopened this Oct 28, 2020
@freddy311082
Copy link
Author

@chrisjpatty Sorry, but that I'm testing a simple piece of code, I got this error...

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
    See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.

See the public repo here (https://github.com/freddy311082/flumeexample) with a very simple change in App.js. I created a react app without typescript. I'm definitely missing something.

Any other comment here my friend?

@chrisjpatty
Copy link
Owner

@freddy311082 No worries, looking at it my guess is it's because you're trying to write jsx directly inside of the call to ReactDOM.render(). What I would try is moving that code to the App.js file and import it into the index.js file like normal. If that doesn't fix it let me know.

@freddy311082
Copy link
Author

@chrisjpatty Same error ☹️. I pushed the change. I copied and pasted the same code as here in App.js

@chrisjpatty
Copy link
Owner

@freddy311082 It looks like you don't actually have flume installed. I pulled down your repo and ran npm install flume, and then it starts up just fine. Does that fix it on your end?

@freddy311082
Copy link
Author

Oh! that's the issue.... I was in the wrong folder, sorry.... the issue is the same as the one I reported at the beginning and here is the full log

0 verbose cli [
0 verbose cli   '/usr/local/Cellar/node/15.0.1/bin/node',
0 verbose cli   '/usr/local/bin/npm',
0 verbose cli   'install',
0 verbose cli   'flume'
0 verbose cli ]
1 info using npm@7.0.3
2 info using node@v15.0.1
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/Users/freddy/projects/flume/flumejs/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/Users/freddy/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 5ms
19 verbose npm-session b601ba63e3a59fbb
20 timing npm:load Completed in 11ms
21 timing arborist:ctor Completed in 0ms
22 timing idealTree:init Completed in 691ms
23 timing idealTree:userRequests Completed in 2ms
24 silly idealTree buildDeps
25 silly fetch manifest flume@*
26 timing arborist:ctor Completed in 0ms
27 http fetch GET 304 https://registry.npmjs.org/flume 1187ms (from cache)
28 silly fetch manifest prop-types@^15.5.4
29 http fetch GET 304 https://registry.npmjs.org/prop-types 42ms (from cache)
30 silly fetch manifest react@^17.0.1
31 http fetch GET 304 https://registry.npmjs.org/react 39ms (from cache)
32 timing idealTree Completed in 1973ms
33 timing command:install Completed in 1975ms
34 verbose stack Error: unable to resolve dependency tree
34 verbose stack     at Arborist.[failPeerConflict] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1011:25)
34 verbose stack     at Arborist.[loadPeerSet] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:991:36)
34 verbose stack     at async Arborist.[buildDepStep] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:760:11)
34 verbose stack     at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:202:7)
34 verbose stack     at async Promise.all (index 1)
34 verbose stack     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:121:5)
34 verbose stack     at async install (/usr/local/lib/node_modules/npm/lib/install.js:40:5)
35 verbose cwd /Users/freddy/projects/flume/flumejs
36 verbose Darwin 19.6.0
37 verbose argv "/usr/local/Cellar/node/15.0.1/bin/node" "/usr/local/bin/npm" "install" "flume"
38 verbose node v15.0.1
39 verbose npm  v7.0.3
40 error code ERESOLVE
41 error ERESOLVE unable to resolve dependency tree
42 error
43 error While resolving: flumejs@0.1.0
43 error Found: react@17.0.1
43 error node_modules/react
43 error   react@"^17.0.1" from the root project
43 error
43 error Could not resolve dependency:
43 error peer react@"^16.13.1" from flume@0.6.1
43 error node_modules/flume
43 error   flume@"*" from the root project
43 error
43 error Fix the upstream dependency conflict, or retry
43 error this command with --force, or --legacy-peer-deps
43 error to accept an incorrect (and potentially broken) dependency resolution.
43 error
43 error See /Users/freddy/.npm/eresolve-report.txt for a full report.```

:(

@chrisjpatty
Copy link
Owner

@freddy311082 Were you able to get this resolved on your end? I just released v0.6.3 which resolves some bugs related to React 17, but I don't think this problem you were having was actually related to React 17.

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

2 participants