Closed vvaland closed 3 years ago
Hi
I'm trying out the basic usage example for react-keyed-file-browser, but my webpack compile is throwing the below errors
ERROR in ./~/react-keyed-file-browser/~/react-dnd-html5-backend/lib/HTML5Backend.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\react-dnd-html5-backend\lib\HTML5Backend.js Unexpected token (390:12) You may need an appropriate loader to handle this file type. | return { | dropEffect: this.altKeyPressed ? 'copy' : 'move', | ...(sourceNodeOptions || {}), | }; | } @ ./~/react-keyed-file-browser/~/react-dnd-html5-backend/lib/index.js 1:0-42 @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
ERROR in ./~/react-keyed-file-browser/~/react-dnd/lib/common/DndProvider.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\react-dnd\lib\common\DndProvider.js Unexpected token (7:45) You may need an appropriate loader to handle this file type. | A React component that provides the React-DnD context | / | export const DndProvider = memo(({ children, ...props }) => { | const context = 'manager' in props | ? { dragDropManager: props.manager } @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/index.js 2:0-44 @ ./~/react-keyed-file-browser/~/react-dnd/lib/index.js @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
ERROR in ./~/react-keyed-file-browser/~/dnd-core/lib/reducers/index.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\dnd-core\lib\reducers\index.js Unexpected token (12:16) You may need an appropriate loader to handle this file type. | type: action.type, | payload: { | ...action.payload, | prevTargetIds: get(state, 'dragOperation.targetIds', []), | }, @ ./~/react-keyed-file-browser/~/dnd-core/lib/DragDropManagerImpl.js 2:0-33 @ ./~/react-keyed-file-browser/~/dnd-core/lib/factories.js @ ./~/react-keyed-file-browser/~/dnd-core/lib/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/DndContext.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/index.js @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
ERROR in ./~/react-keyed-file-browser/~/dnd-core/lib/actions/dragDrop/drop.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\dnd-core\lib\actions\dragDrop\drop.js Unexpected token (17:24) You may need an appropriate loader to handle this file type. | payload: { | dropResult: { | ...options, | ...dropResult, | }, @ ./~/react-keyed-file-browser/~/dnd-core/lib/actions/dragDrop/index.js 4:0-32 @ ./~/react-keyed-file-browser/~/dnd-core/lib/DragDropManagerImpl.js @ ./~/react-keyed-file-browser/~/dnd-core/lib/factories.js @ ./~/react-keyed-file-browser/~/dnd-core/lib/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/DndContext.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/index.js @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
my .babelrc looks as below { "presets": ["es2015", "react"], "plugins": ["transform-object-rest-spread", "transform-async-to-generator"] }
webpack.config.js loaders look as below module: { loaders: [ { test: /.js$/, exclude: /node_modules/, loader: 'babel-loader', }, { test: /.css$/, use: ['style-loader', 'css-loader'], }, ], },
Can you please help?
thank you
Hello! In the newer versions we have let go of webpack so this should not be an issue anymore. I'll be closing this but if you still have issues, feel free to re-open!
Hi
I'm trying out the basic usage example for react-keyed-file-browser, but my webpack compile is throwing the below errors
ERROR in ./~/react-keyed-file-browser/~/react-dnd-html5-backend/lib/HTML5Backend.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\react-dnd-html5-backend\lib\HTML5Backend.js Unexpected token (390:12) You may need an appropriate loader to handle this file type. | return { | dropEffect: this.altKeyPressed ? 'copy' : 'move', | ...(sourceNodeOptions || {}), | }; | } @ ./~/react-keyed-file-browser/~/react-dnd-html5-backend/lib/index.js 1:0-42 @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
ERROR in ./~/react-keyed-file-browser/~/react-dnd/lib/common/DndProvider.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\react-dnd\lib\common\DndProvider.js Unexpected token (7:45) You may need an appropriate loader to handle this file type. | A React component that provides the React-DnD context | / | export const DndProvider = memo(({ children, ...props }) => { | const context = 'manager' in props | ? { dragDropManager: props.manager } @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/index.js 2:0-44 @ ./~/react-keyed-file-browser/~/react-dnd/lib/index.js @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
ERROR in ./~/react-keyed-file-browser/~/dnd-core/lib/reducers/index.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\dnd-core\lib\reducers\index.js Unexpected token (12:16) You may need an appropriate loader to handle this file type. | type: action.type, | payload: { | ...action.payload, | prevTargetIds: get(state, 'dragOperation.targetIds', []), | }, @ ./~/react-keyed-file-browser/~/dnd-core/lib/DragDropManagerImpl.js 2:0-33 @ ./~/react-keyed-file-browser/~/dnd-core/lib/factories.js @ ./~/react-keyed-file-browser/~/dnd-core/lib/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/DndContext.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/index.js @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
ERROR in ./~/react-keyed-file-browser/~/dnd-core/lib/actions/dragDrop/drop.js Module parse failed: ...\node_modules\react-keyed-file-browser\node_modules\dnd-core\lib\actions\dragDrop\drop.js Unexpected token (17:24) You may need an appropriate loader to handle this file type. | payload: { | dropResult: { | ...options, | ...dropResult, | }, @ ./~/react-keyed-file-browser/~/dnd-core/lib/actions/dragDrop/index.js 4:0-32 @ ./~/react-keyed-file-browser/~/dnd-core/lib/DragDropManagerImpl.js @ ./~/react-keyed-file-browser/~/dnd-core/lib/factories.js @ ./~/react-keyed-file-browser/~/dnd-core/lib/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/DndContext.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/common/index.js @ ./~/react-keyed-file-browser/~/react-dnd/lib/index.js @ ./~/react-keyed-file-browser/dist/react-keyed-file-browser.js @ ./~/react-keyed-file-browser/index.js
my .babelrc looks as below { "presets": ["es2015", "react"], "plugins": ["transform-object-rest-spread", "transform-async-to-generator"] }
webpack.config.js loaders look as below module: { loaders: [ { test: /.js$/, exclude: /node_modules/, loader: 'babel-loader', }, { test: /.css$/, use: ['style-loader', 'css-loader'], }, ], },
Can you please help?
thank you