westandy opened a new issue #9752:
URL: https://github.com/apache/arrow/issues/9752


   **Steps**:
   1) `npm install apache-arrow`
   2) Wrote code and it runs fine:
   ```
   import { Table } from 'apache-arrow';
   ...
   .. Table.from(data);
   ```
   3) Run webpack against my project and I get the **Error** you see below.  
   The webpack config is here:
   ```
   const path = require('path');
   
   module.exports = {
     target: 'node',
     mode: 'production',
     entry: './src/index.ts',
     output: {
       filename: 'bundle.js',
       path: path.resolve(__dirname, 'dist'),
       libraryTarget: 'umd'
     },
     resolve: {
       extensions: ['.ts', '.js']
     },
     module: {
       // keeps a ref to the native require fn for dynamic loading
       noParse: /\/nativeRequire.js$/,
       rules: [
         {
           test: /\.ts$/,
           use: {
             loader: 'ts-loader',
             options: { configFile: 'tsconfig.prod.json' }
           }
         }
       ]
     }
   };
   ```
   
   And my `tsonfig.prod.json` file:
   ```
   {
     "compilerOptions": {
       "outDir": "types",
       "removeComments": true,
       "allowJs": true,
       "preserveConstEnums": true,
       "module": "CommonJS",
       "target": "es5",
       "declaration": true,
       "esModuleInterop": true,
       "sourceMap": true,
       "lib": ["esnext"],
       "resolveJsonModule": true,
       "moduleResolution": "node",
       "allowSyntheticDefaultImports": true,
       "paths": {
         "*": ["types/*"]
       },
       "baseUrl": "./",
       "typeRoots": ["node_modules/@types"],
       "types": ["jest", "node"],
       "alwaysStrict": true,
       "noImplicitAny": true
     },
     "include": ["src/**/*"]
   }
   ```
   
   **Error**:
   ```
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 17:0-43
   Module not found: Error: Can't resolve './io/adapters' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'adapters.js'?
   BREAKING CHANGE: The request './io/adapters' failed to resolve only because 
it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 18:0-42
   Module not found: Error: Can't resolve './builder/index' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'index.js'?
   BREAKING CHANGE: The request './builder/index' failed to resolve only 
because it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 19:0-49
   Module not found: Error: Can't resolve './ipc/reader' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'reader.js'?
   BREAKING CHANGE: The request './ipc/reader' failed to resolve only because 
it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 20:0-49
   Module not found: Error: Can't resolve './ipc/writer' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'writer.js'?
   BREAKING CHANGE: The request './ipc/writer' failed to resolve only because 
it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 21:0-51
   Module not found: Error: Can't resolve './io/whatwg/iterable' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'iterable.js'?
   BREAKING CHANGE: The request './io/whatwg/iterable' failed to resolve only 
because it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 22:0-62
   Module not found: Error: Can't resolve './io/whatwg/builder' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'builder.js'?
   BREAKING CHANGE: The request './io/whatwg/builder' failed to resolve only 
because it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 23:0-71
   Module not found: Error: Can't resolve './io/whatwg/reader' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'reader.js'?
   BREAKING CHANGE: The request './io/whatwg/reader' failed to resolve only 
because it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 24:0-71
   Module not found: Error: Can't resolve './io/whatwg/writer' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'writer.js'?
   BREAKING CHANGE: The request './io/whatwg/writer' failed to resolve only 
because it was resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in ./node_modules/apache-arrow/Arrow.dom.mjs 29:0-2593
   Module not found: Error: Can't resolve './Arrow' in 
'C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\apache-arrow'
   Did you mean 'Arrow.js'?
   BREAKING CHANGE: The request './Arrow' failed to resolve only because it was 
resolved as fully specified
   (probably because the origin is a '*.mjs' file or a '*.js' file where the 
package.json contains '"type": "module"').
   The extension in the request is mandatory for it to be fully specified.
   Add the extension to the request.
    @ ./src/core/RecordBatch.ts 4:21-44
    @ ./src/core/index.ts 33:20-44
    @ ./src/index.ts 15:13-30
   
   ERROR in bundle.js from Terser
   Invalid assignment [bundle.js:8453,141]
       at js_error 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:550:11)
       at croak 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:1274:9)
       at maybe_assign 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:3450:13)
       at expression 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:3459:24)
       at simple_statement 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:1583:55)
       at statement 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:1396:19)
       at _embed_tokens_wrapper 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:1339:26)
       at block_ 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:2172:20)
       at _function_body 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:2084:21)
       at arrow_function 
(C:\Users\andy.westmeyer\repos\ayx-sdks\ayx-node-sdk\node_modules\terser\dist\bundle.min.js:1692:20)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to