v11 build errors
See original GitHub issueDescribe the Bug
I’ve just had a go at upgrading to v11 from v10 - I’m seeing 3 build errors. Current react version is 17.0.2, which you’ve indicated should be compatible? I don’t think I should be having to add new loaders no?
✖ 「wdm」:
ERROR in /node_modules/@reactflow/core/dist/esm/index.js 16:19
Module parse failed: Unexpected token (16:19)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| function Attribution({ proOptions, position = 'bottom-right' }) {
> if (proOptions?.hideAttribution) {
| return null;
| }
ERROR in /node_modules/@reactflow/minimap/dist/esm/index.js 36:31
Module parse failed: Unexpected token (36:31)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| function MiniMap({ style, className, nodeStrokeColor = '#555', nodeColor = '#fff', nodeClassName = '', nodeBorderRadius = 5, nodeStrokeWidth = 2, maskColor = 'rgb(240, 242, 243, 0.7)', position = 'bottom-right', }) {
| const { boundingRect, viewBB, nodes, rfId } = useStore(selector, shallow);
> const elementWidth = style?.width ?? defaultWidth;
| const elementHeight = style?.height ?? defaultHeight;
| const nodeColorFunc = getAttrFunction(nodeColor);
ERROR in /node_modules/@reactflow/controls/dist/esm/index.js 43:17
Module parse failed: Unexpected token (43:17)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| const onZoomInHandler = () => {
| zoomIn();
> onZoomIn?.();
| };
| const onZoomOutHandler = () => {
ℹ 「wdm」: Failed to compile.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
- Remove
react-flow-renderer
- Add
reactflow
- Change import package names
- Rebuild
Expected behavior
I expected my application to build as before
Screenshots or Videos
No response
Platform
- OS: Linux
- Browser: Chrome - n/a
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Build errors v11.0.0 · Issue #763 · qpdf/qpdf - GitHub
The MacPorts port maintainer here. I was trying to update qpdf to version 11.0.0 under macOS 12.5.1. I get the following build errors:....
Read more >WINCC PRO V11 build problem with (0 errors, 0 warnings)
Hi all, as the title said, i have a problem with WINCC pro v11, i cant compile the software HMI, and it said...
Read more >Xcode v11.1 and 11.2 - Build OK but Archive fails - GRPC
Running the project on a device in debug mode works, this error happens only when archiving. I guess this problems are due to...
Read more >Jmol / Bugs / #608 fails to build from source jdk v13, v11, v10
#608 fails to build from source jdk v13, v11, v10. Milestone: v14. Status: open. Owner: nobody. Labels: None. Priority: 5.
Read more >Solved: Problem incorporating V11.17.2 - Flexera Community
I am updating from V11.13.1.2 to V11.17.2 and have encountered a couple of issues getting lm_new.obj to build when in my code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For the ones using
electron-webpack
(using webpack 4, but obscuring config (which should make it easier, most of the time) some fixing code:In your
webpack.renderer.additions.js
file:The trick above is that all
node_modules
are excluded by default in the (inaccessible) config. But to explicitly include@reactflow
here in the rule.If you don’t have a
webpack.renderer.additions.js
yet, create it and enable it in yourpackage.json
:In general, also for @cgross : Maybe adding an include rule is easier?
include: path.resolve(__dirname, "node_modules/@reactflow")
As the regex does not work that great apparently on Windows… Maybe you could try (untested):
exclude: /node_modules(?![\/\\]@reactflow)/
instead ofexclude: /node_modules(?!\/@reactflow)/
to match both backward and forward slashes (for Windows).Thanks @Bartel-C8. I was able to get around it by padding the necessary babel plugins to process reactflow rather than excluding it.