Hello, I’m working on a custom fork of the Indico codebase and recently I’ve been trying to effectively rebase to 3.3.3 (starting from 3.2.9), and webpack is failing with messages I think are related to missing entries in url_map.json.
Here’s an example:
ERROR in ../../modules/rb/client/js/common/bookings/actions.js
Module build failed (from ../../../node_modules/babel-loader/lib/index.js):
SyntaxError: /app/indico/modules/rb/client/js/common/bookings/actions.js: indico-url imports must reference a valid flask endpoint
7 |
8 | import fetchBookingDetailsURL from 'indico-url:rb.booking_details';
> 9 | import bookingOccurrenceLinkURL from 'indico-url:rb.booking_occurrence_link';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 | import bookingOccurrenceStateActionsURL from 'indico-url:rb.booking_occurrence_state_actions';
11 | import bookingStateActionsURL from 'indico-url:rb.booking_state_actions';
12 | import bookingDeleteURL from 'indico-url:rb.delete_booking';
at File.buildCodeFrameError (/app/node_modules/@babel/core/lib/transformation/file/file.js:202:12)
at NodePath.buildCodeFrameError (/app/node_modules/@babel/traverse/lib/path/index.js:98:21)
at PluginPass.exit (/app/node_modules/babel-plugin-flask-urls/lib/plugin.js:70:40)
at newFn (/app/node_modules/@babel/traverse/lib/visitors.js:160:14)
at NodePath._call (/app/node_modules/@babel/traverse/lib/path/context.js:46:20)
at NodePath.call (/app/node_modules/@babel/traverse/lib/path/context.js:36:17)
at NodePath.visit (/app/node_modules/@babel/traverse/lib/path/context.js:90:8)
at TraversalContext.visitQueue (/app/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitMultiple (/app/node_modules/@babel/traverse/lib/context.js:61:17)
at TraversalContext.visit (/app/node_modules/@babel/traverse/lib/context.js:110:19)
at traverseNode (/app/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/app/node_modules/@babel/traverse/lib/path/context.js:88:52)
at TraversalContext.visitQueue (/app/node_modules/@babel/traverse/lib/context.js:89:16)
at TraversalContext.visitSingle (/app/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/app/node_modules/@babel/traverse/lib/context.js:112:19)
at traverseNode (/app/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at traverse (/app/node_modules/@babel/traverse/lib/index.js:52:34)
at transformFile (/app/node_modules/@babel/core/lib/transformation/index.js:82:31)
at transformFile.next (<anonymous>)
at run (/app/node_modules/@babel/core/lib/transformation/index.js:24:12)
at run.next (<anonymous>)
at transform (/app/node_modules/@babel/core/lib/transform.js:22:33)
at transform.next (<anonymous>)
at step (/app/node_modules/gensync/index.js:261:32)
at /app/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/app/node_modules/gensync/index.js:223:11)
@ ../../modules/rb/client/js/common/rooms/reducers.js 15:0-54 100:11-47 122:11-48
@ ../../modules/rb/client/js/common/rooms/index.js 10:0-48 10:0-48
@ ../../modules/rb/client/js/setup.jsx 15:0-57 40:23-55 41:23-46
@ ../../modules/rb/client/js/index.jsx 9:0-28 13:0-5
I can’t figure out why the URLs are missing from the URL map JSON file, but this seems to be the root cause of the issue.