Build failure following recent MQTT release
See original GitHub issueConfirm by changing [ ] to [x] below to ensure that it’s a bug:
- I’ve searched for previous similar issues and didn’t find any solution
Describe the bug Our builds have been failing with the following tracebacks this week:
$ npm run build
> ionicskala5@2.0.1 build /builds/Software/IonicSkala
> ionic-app-scripts build
[15:33:43] ionic-app-scripts 3.2.4
[15:33:43] build dev started ...
[15:33:43] clean started ...
[15:33:43] clean finished in 2 ms
[15:33:43] copy started ...
[15:33:43] deeplinks started ...
[15:33:45] deeplinks finished in 1.70 s
[15:33:45] transpile started ...
[15:34:17] transpile finished in 32.86 s
[15:34:17] preprocess started ...
[15:34:17] preprocess finished in 2 ms
[15:34:17] webpack started ...
[15:34:18] copy finished in 34.98 s
[15:34:44] ionic-app-script task: "build"
[15:34:44] Error: ./node_modules/mqtt/lib/client.js Module parse failed: Unexpected token (118:38) You may need an
appropriate loader to handle this file type. | if (alias) { | packet.topic = '' | packet.properties = {
...(packet.properties), topicAlias: alias } | debug('applyTopicAlias :: auto assign(use) topic: %s - alias:
%d', topic, alias) | } else { @ ./node_modules/mqtt/lib/connect/index.js 3:19-39 @
./node_modules/aws-crt/dist.browser/browser/mqtt.js @ ./node_modules/aws-crt/dist.browser/browser.js @
./node_modules/aws-iot-device-sdk-v2/dist/index.js @ ./src/pages/util/SkalaControlWebsocket.ts @
./src/app/app.module.ts @ ./src/app/main.ts
Error: ./node_modules/mqtt/lib/client.js
Module parse failed: Unexpected token (118:38)
You may need an appropriate loader to handle this file type.
| if (alias) {
| packet.topic = ''
| packet.properties = { ...(packet.properties), topicAlias: alias }
| debug('applyTopicAlias :: auto assign(use) topic: %s - alias: %d', topic, alias)
| } else {
@ ./node_modules/mqtt/lib/connect/index.js 3:19-39
@ ./node_modules/aws-crt/dist.browser/browser/mqtt.js
@ ./node_modules/aws-crt/dist.browser/browser.js
@ ./node_modules/aws-iot-device-sdk-v2/dist/index.js
@ ./src/pages/util/SkalaControlWebsocket.ts
@ ./src/app/app.module.ts
@ ./src/app/main.ts
at new BuildError (/builds/Software/IonicSkala/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/builds/Software/IonicSkala/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
at /builds/Software/IonicSkala/node_modules/webpack/lib/Compiler.js:265:13
at Compiler.emitRecords (/builds/Software/IonicSkala/node_modules/webpack/lib/Compiler.js:371:38)
at /builds/Software/IonicSkala/node_modules/webpack/lib/Compiler.js:258:10
at /builds/Software/IonicSkala/node_modules/webpack/lib/Compiler.js:364:12
at next (/builds/Software/IonicSkala/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.<anonymous> (/builds/Software/IonicSkala/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/builds/Software/IonicSkala/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/builds/Software/IonicSkala/node_modules/webpack/lib/Compiler.js:361:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionicskala5@2.0.1 build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionicskala5@2.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-01-06T15_34_44_300Z-debug.log
I know that AWS IOT uses the MQTT.js project as their MQTT client, and MQTT released a new version 22 hours ago. I was only able to make the errors above go away by reverting MQTT to version 2.18.9, the last stable version before AWS IOT’s last release. With any newer version, the issue seems to reappear.
SDK version number 1.6.4
Platform/OS/Hardware/Device Happens on all our machines, both Windows and Linux docker containers.
To Reproduce (observed behavior) We have an Ionic application, and Ionic has its own CLI for building the project. This issue seems to occur at the build stage. Not sure how to help you all reproduce this issue, but I am having trouble understanding the traceback and maybe you all may have some more ideas? Other people have to be experiencing this issue, and it could be that it only occurred last night with the latest release of MQTT.
const level : io.LogLevel = parseInt(io.LogLevel[argv.verbosity.toUpperCase()]);
io.enable_logging(level);
Additional context Temporary fix seems to be specifically rolling back MQTT to 2.18.9.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Hi @omar-enrique, we have tested couple samples with MQTT 4.3.0, but we are not able to reproduce the issue. It would be hard for us to track the issue without the same dev environment setup. Therefore, we will move on to other issues for now.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.