This repository was archived by the owner on Feb 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 325
This repository was archived by the owner on Feb 15, 2025. It is now read-only.
fresh nwb new react-component compilation crashes #580
Copy link
Copy link
Open
Description
This issue is a: Bug report
# using latest published nwb v0.25.2
$ npx nwb new react-component my-component
$ cd my-component
$ npm install
$ npm start
Failed to compile with 1 error.
ERROR in ./demo/src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: /tmp/gg/my-component/demo/src/index.js: pass.get(...) is not a function
at Object.post (/tmp/gg/my-component/node_modules/@babel/plugin-transform-react-jsx/lib/transform-classic.js:48:47)
at buildElementCall (/tmp/gg/my-component/node_modules/@babel/helper-builder-react-jsx/lib/index.js:167:12)
at PluginPass.exit (/tmp/gg/my-component/node_modules/@babel/helper-builder-react-jsx/lib/index.js:53:24)
at newFn (/tmp/gg/my-component/node_modules/@babel/traverse/lib/visitors.js:181:21)
at NodePath._call (/tmp/gg/my-component/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/tmp/gg/my-component/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/tmp/gg/my-component/node_modules/@babel/traverse/lib/path/context.js:109:8)
at TraversalContext.visitQueue (/tmp/gg/my-component/node_modules/@babel/traverse/lib/context.js:105:16)
at TraversalContext.visitMultiple (/tmp/gg/my-component/node_modules/@babel/traverse/lib/context.js:74:17)
at TraversalContext.visit (/tmp/gg/my-component/node_modules/@babel/traverse/lib/context.js:131:19)
at traverseNode (/tmp/gg/my-component/node_modules/@babel/traverse/lib/traverse-node.js:24:17)
at NodePath.visit (/tmp/gg/my-component/node_modules/@babel/traverse/lib/path/context.js:107:52)
at TraversalContext.visitQueue (/tmp/gg/my-component/node_modules/@babel/traverse/lib/context.js:105:16)
at TraversalContext.visitSingle (/tmp/gg/my-component/node_modules/@babel/traverse/lib/context.js:79:19)
at TraversalContext.visit (/tmp/gg/my-component/node_modules/@babel/traverse/lib/context.js:133:19)
at traverseNode (/tmp/gg/my-component/node_modules/@babel/traverse/lib/traverse-node.js:24:17)
@ multi ./node_modules/@pmmmwh/react-refresh-webpack-plugin/src/runtime/ReactRefreshEntry.js (webpack)-dev-server/client?/ ./node_modules/@pmmmwh/react-refresh-webpack-plugin/src/runtime/ErrorOverlayEntry.js (webpack)/hot/only-dev-server.js ./demo/src/index.js main[4]
it's caused by babel/babel@b1e73d6#diff-3670f8045f2c739225a4da543e477ae1fca436a1ab52d5fdbee5771bf5f51b2c
A workaround is to use
"@babel/helper-builder-react-jsx": "7.16.7"
in mycomponent/package.json
Apparently transform classic was removed in 7.12 so usng helper-builder-react-jsx 7.12+ with transform-react-jsx 7.9 is unsupported anyway, and more dependencies versions should be pinned in nwb ?
Metadata
Metadata
Assignees
Labels
No labels