GithubHelp home page GithubHelp logo

Comments (11)

rreusser avatar rreusser commented on July 30, 2024

Thanks for reporting. To confirm, are you in the master branch of react-plotly.js-editor and have you run npm run prepublishOnly in the react-plotly.js-editor directory since pulling the most recent changes? Are there any console errors?

Alternatively, you can edit these lines to switch to direct imports of non-transpiled code which eases the restriction of always having to transpile to ES5.

There may be another issue, but hopefully that's a start.

from react-chart-editor.

rreusser avatar rreusser commented on July 30, 2024

Oh, you might also need to do the same (run npm run prepublishOnly) in repo react-plotly.js repo. It's the same story: npm modules should expose ES5 code instead of ES6 + JSX, but the transpiling step is a big pain across repos during development. Apologies for the inconvenience, but I don't immediately see a perfect solution—apart from switching to the direct src/ imports in the lab directory, which bypasses the need to transpile via prepublishOnly in the other directories.

from react-chart-editor.

ereplogle avatar ereplogle commented on July 30, 2024

I updated all the references because npm run prepublishOnly fails on windows because of the mkdir -p command. I fixed the references in the lab example and now I see this compile error:

Module not found: Error: Can’t resolve ‘react-select’ in ‘/Users/erin/Code/plotly/plotly.js-react-editor/lib/components/widgets’
 @ ../plotly.js-react-editor/lib/components/widgets/Dropdown.js 17:19-42
 @ ../plotly.js-react-editor/lib/components/Dropdown.js
 @ ../plotly.js-react-editor/lib/DefaultEditor.js
 @ ../plotly.js-react-editor/lib/PlotlyEditor.js
 @ ../plotly.js-react-editor/lib/index.js
 @ ./src/components/app.js
 @ ./src/index.js
 @ multi babel-polyfill ./src/index

from react-chart-editor.

ereplogle avatar ereplogle commented on July 30, 2024

Hang on, I did that last part on my mac to test it out before I saw your message about also running it in the react repo. Let me try that as well

from react-chart-editor.

ereplogle avatar ereplogle commented on July 30, 2024

ok, so I ran npm run prepublishOnly on my mac in both the react and react-lab repos and still get the error about about not being able to resolve 'react-select'

from react-chart-editor.

ereplogle avatar ereplogle commented on July 30, 2024

ok, another update. sorry for all the confusion. I did everything again on my mac just to be sure and the lab example is now working. so, it looks like there might be another reference I need to change to get things working in our Alteryx codebase since we can't run npm run prepublishOnly? Or is there something else going on, maybe? I did just notice that I get this error in the console

warning.js:36 Warning: Select is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.

from react-chart-editor.

rreusser avatar rreusser commented on July 30, 2024

Okay, I think I need to just rewrite the scripts as scripts instead of shell commands then.

I'm not sure why react-select wouldn't be present. It's in react-plotly.js-editor's package.json here. Can you try running npm install again too to see if that gets it?

from react-chart-editor.

ereplogle avatar ereplogle commented on July 30, 2024

yeah, I think rewriting the scripts will be good. The error about not finding react-select only ever happened on my mac where I can run the prepublishOnly script, but I think I had missed an npm install. Everything else had been ok on our Alteryx environment with updating to use direct imports until this most recent update and only throws the following error in the console when I click on the dropdowns

warning.js:36 Warning: Select is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.

from react-chart-editor.

rreusser avatar rreusser commented on July 30, 2024

Hmm. Is there a file/line number on the findDOMNode issue? It looks like maybe JedWatson/react-select#2034 is relevant here, but I'm not sure why I wouldn't be seeing it.

from react-chart-editor.

ereplogle avatar ereplogle commented on July 30, 2024

It references line 36 of warning.js, oddly

from react-chart-editor.

bpostlethwaite avatar bpostlethwaite commented on July 30, 2024

closing for now, will reopen if we see this again.

from react-chart-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.