-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JS] Unable to build with webpack with strictExportPresence: true #2656
Comments
For context, I ran into this when I was trying to use uwdata/falcon in a As it currently stands, this issue precludes the use of the |
@trxcllnt @TheNeuralBit seems like we should try to get a new JS release out there. Could the data refactor wait until 0.5.0? |
@wesm yes definitely, I think that was the plan all along. I've also run into this issue with webpack, so we should fix this before 0.4.0. I'm not entirely sure how this webpack flag works, since the TS does compile down to compliant syntax for CommonJS and ESModules:
const table_1 = require("./table");
exports.Table = table_1.Table; and the corresponding one in the ESModules file import { Table, CountByResult } from './table';
/* ... */
export { Table, CountByResult }; @tarekrached do you have any ideas on what the fix would be? |
For the record my workaround has been to add webpackConfig.module.rules[0].oneOf.push({
test: /\.(js|jsx|mjs)$/,
loader: 'happypack/loader?id=babel',
exclude: webpackConfig.module.noParse,
include: [
, paths.appSrc
, /node_modules\/ix/
, /graphistry\/apps/
, /node_modules\/apache-arrow/
, /node_modules\/symbol-observable/
].filter(Boolean),
}); |
@trxcllnt I don't have a clue what the fix would be, sorry. I tried messing around with some of the ts compiler settings in FWIW it looks like this no longer manifests in the hot-off-the-presses |
I think the relevant facebook/create-react-app@3ae3cf3#diff-d2bddbd3bfb7051f9381474c844674fa I say this because the error that surfaced in
and the flatbuffers source is |
everybody has some solution? |
I think this issue in also possibly related: webpack/webpack#7973 Broken cjs & esm interop |
Any next steps here after the JS internals refactor, or can this be closed? |
I believe the original issue in this thread has been resolved by create-react-app updates. There's still a separate Webpack 4 bug that causes webpack to incorrectly compile when a project has CommonJS and ESM side-by-side. Apparently it has been fixed in Webpack 5, but There is a workaround for Webpack 4 that I've tested works, so I've filed a report with CRA about rolling back to an earlier config that worked in 4. In the meantime, I've been using the |
OK, if there is an action item or something to follow up on please open a JIRA issue. Closing this for now |
This took me a while to track down, but the long and short of it is that the
apache-arrow
npm module can't be used in webpack with thestrictExportPresence
webpack config flag set to true.This manifested when I tried using apache-arrow in a
create-react-app
application - it worked fine in the development mode, but failed when I tried to build the production bundle. (Note that this was for[email protected]
- in the nearly-completedreact-scripts@2
, dev mode fails, too.)I have a minimal reproduction of this issue here.
The following may be related:
The text was updated successfully, but these errors were encountered: