qooxdoo / qooxdoo

qooxdoo - Universal JavaScript Framework
http://qooxdoo.org
Other
769 stars 262 forks source link

Error using compiler for deploy or build #10417

Closed eda2z closed 2 years ago

eda2z commented 2 years ago

I am using node v18.4.0 with qooxdoo version 7.1.1. I was making some changes to an existing app which worked fine. I started off just compiling to source so that I could debug the code. When I tried "qx deploy --clean" I get the following:

[ed@spike cookbook]$ qx deploy --clean Making applications... qx.util.Uuid:94: automatically detected 'require(crypto)` Writing application cookbook Unhandled promise rejection: Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer at readWasm (/home/ed/.nvm/versions/node/v18.4.0/lib/node_modules/@qooxdoo/framework/node_modules/terser/node_modules/source-map/lib/read-wasm.js:8:13) at wasm (/home/ed/.nvm/versions/node/v18.4.0/lib/node_modules/@qooxdoo/framework/node_modules/terser/node_modules/source-map/lib/wasm.js:25:16) at /home/ed/.nvm/versions/node/v18.4.0/lib/node_modules/@qooxdoo/framework/node_modules/terser/node_modules/source-map/lib/source-map-consumer.js:264:14 at async SourceMap (/home/ed/.nvm/versions/node/v18.4.0/lib/node_modules/@qooxdoo/framework/node_modules/terser/dist/bundle.min.js:19362:20) at async Object.minify (/home/ed/.nvm/versions/node/v18.4.0/lib/node_modules/@qooxdoo/framework/node_modules/terser/dist/bundle.min.js:27714:41) at async wrapper.writeSourceCodeToStream (/home/ed/.nvm/versions/node/v18.4.0/lib/node_modules/@qooxdoo/framework/lib/compiler/index.js:55716:22) at async /home/ed/.nvm/versions/node/v18.4.0/lib/node_modules/@qooxdoo/framework/lib/compiler/index.js:54513:13

I get a similar error stream if I try "qx compile -t build". I also got the errors with node v18.3.0.

eda2z commented 2 years ago

I tried several other options: revert to original app code - same results switched to node 18.0.0 - same results switched to node 16.15.1 (last lts based on nvm) - everything works fine

I guess I'll just stick with node 16.15.1.

adrelino commented 2 years ago

I get the same problem, but also with node 16:

$ ./bootstrap-compiler 
Deleting previous bootstrap compiler
Creating temporary compiler with known-good one
***
*** Known Good Compiler Version: 7.1.1
***
run ./qooxdoo/known-good/node_modules/.bin/qx compile --target=build
Making applications...
Writing application compiler
Applications are made
Compiling source version
Compiler:  v7.1.1 in ./qooxdoo/bootstrap/qx
Framework: v7.1.1 in ./qooxdoo
Qooxdoo found in ./qooxdoo
Making applications...
qx.util.Uuid:94: automatically detected 'require(crypto)`
Writing application qxWeb
Completed all applications, libraries used are:
qx (./qooxdoo)
Writing application compiler
Writing application compilerLibrary
Writing application qx_server
Completed all applications, libraries used are:
qx (./qooxdoo)
Applications are made
Compiling build version
Compiler:  v7.1.1 in ./qooxdoo/bootstrap/qx
Framework: v7.1.1 in ./qooxdoo
Qooxdoo found in ./qooxdoo
Making applications...
qx.util.Uuid:94: automatically detected 'require(crypto)`
Writing application qxWeb
Unhandled promise rejection: Error: You must provide the string URL or ArrayBuffer contents of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
    at readWasm (./qooxdoo/node_modules/source-map/lib/read-wasm.js:20:11)
    at wasm (./qooxdoo/node_modules/source-map/lib/wasm.js:25:16)
    at ./qooxdoo/node_modules/source-map/lib/source-map-consumer.js:247:14
Unhandled promise rejection: TypeError: map.eachMapping is not a function
    at wrapper._copySourceMap (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54641:17)
    at async wrapper._copySourceMap (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54637:22)
    at async wrapper.getSourceMap (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54885:19)
    at async wrapper.writeSourceCodeToStream (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:55791:27)
    at async ./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54598:13
Writing application compiler
Unhandled promise rejection: Error: You must provide the string URL or ArrayBuffer contents of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
    at readWasm (./qooxdoo/node_modules/source-map/lib/read-wasm.js:20:11)
    at wasm (./qooxdoo/node_modules/source-map/lib/wasm.js:25:16)
    at ./qooxdoo/node_modules/source-map/lib/source-map-consumer.js:247:14
Error: TypeError: map.eachMapping is not a function
    at wrapper._copySourceMap (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54641:17)
    at async wrapper._copySourceMap (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54637:22)
    at async wrapper.getSourceMap (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54885:19)
    at async wrapper.writeToDisk (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:54601:21)
    at async wrapper._writeApplication (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:48055:9)
    at async wrapper._writeApplication (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:48343:16)
    at async wrapper.generateApplication (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:47818:9)
    at async wrapper.make (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:49840:11)
    at async ./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:46384:20
From previous event:
    at Function.__P_69_8 (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:20562:68)
    at Function.all (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:20138:27)
    at wrapper._loadConfigAndStartMaking (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:46311:26)
    at async wrapper.process (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:46266:9)
    at async wrapper.processCommand (./qooxdoo/bootstrap/compiled/node/build/compiler/index.js:35247:23)

Node:

$ node --version
v16.15.0
$ npm --version
8.5.5
$ npm list
@qooxdoo/framework@7.1.1 ./qooxdoo
├── @babel/core@7.17.10
├── @babel/eslint-parser@7.16.3
├── @babel/generator@7.17.10
├── @babel/parser@7.17.10
├── @babel/plugin-proposal-nullish-coalescing-operator@7.16.7
├── @babel/plugin-proposal-optional-chaining@7.16.7
├── @babel/plugin-syntax-jsx@7.16.7
├── @babel/plugin-transform-block-scoping@7.16.7
├── @babel/plugin-transform-react-jsx@7.16.0
├── @babel/preset-env@7.17.10
├── @babel/preset-react@7.16.0
├── @babel/preset-typescript@7.16.0
├── @babel/traverse@7.17.10
├── @babel/types@7.17.10
├── @foliojs-fork/fontkit@1.9.1
├── @metalsmith/layouts@2.5.1
├── @metalsmith/markdown@1.5.0
├── @octokit/rest@18.12.0
├── @qooxdoo/eslint-config-jsdoc-disable@1.0.3
├── @qooxdoo/eslint-config-qx@2.0.1
├── @qooxdoo/eslint-plugin-qx@1.2.21
├── ajv@8.8.1
├── app-module-path@2.2.0
├── async@2.6.4
├── babelify@10.0.0
├── better-ajv-errors@1.1.1
├── browserify@17.0.0
├── chokidar@3.5.2
├── cldr@7.1.1
├── columnify@1.5.4
├── console-control-strings@1.1.0
├── core-js-bundle@3.19.1
├── dirsum@0.1.1
├── dot@1.1.3
├── download@6.2.5
├── es6-promise-pool@2.5.0
├── eslint-formatter-codeframe@7.32.1
├── eslint-plugin-jsdoc@37.0.3
├── eslint@8.2.0
├── express@4.17.1
├── gauge@2.7.4
├── get-value@3.0.1
├── github-api@3.4.0
├── glob@7.2.0
├── image-size@0.8.3
├── inquirer@7.3.3
├── json-stable-stringify@1.0.1
├── jstransformer-dot@0.1.2
├── metalsmith@2.4.3
├── node-fetch@2.6.7
├── object-hash@2.2.0
├── prettier@2.5.1
├── ps-tree@1.2.0
├── replace-in-file@5.0.2
├── rimraf@3.0.2
├── sass@1.43.4
├── semver@7.3.5
├── set-value@4.1.0
├── showdown@1.9.1
├── source-map-support@0.5.21
├── source-map@0.7.4
├── tap-colorize@1.2.0
├── tape@5.3.2
├── terser@5.10.0
├── tmp@0.2.1
├── unset-value@1.0.0
├── upath@1.2.0
├── update-notifier@4.1.3
├── xml2js@0.4.23
└── yargs@15.4.1
adrelino commented 2 years ago

This issue was fixed with #10424 and can be closed.