You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/09/08 06:44:25 UTC
[GitHub] [trafficcontrol] zrhoffman opened a new issue #6171: Building Traffic Portal: SyntaxError: Unexpected token ...
zrhoffman opened a new issue #6171:
URL: https://github.com/apache/trafficcontrol/issues/6171
<!--
************ STOP!! ************
If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact
the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
guidelines at https://apache.org/security regarding vulnerability disclosure.
- For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/slack-invite)
or the Traffic Control Users mailing list (send an email to users-subscribe@trafficcontrol.apache.org to subscribe).
- Before submitting, please **SEARCH GITHUB** for a similar issue or PR
* https://github.com/apache/trafficcontrol/issues
* https://github.com/apache/trafficcontrol/pulls
-->
<!-- Do not submit security vulnerabilities or support requests here - see above -->
## This Bug Report affects these Traffic Control components:
<!-- delete all those that don't apply -->
- Traffic Portal
## Current behavior:
<!-- Describe how the bug happens -->
Attempting to build Traffic Portal using NodeJS < 8 and grunt-cli >= v1.4.0 results in a `SyntaxError` in the micromatch package with the spread operator:
```js
/usr/lib/node_modules/grunt-cli/node_modules/micromatch/index.js:44
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/grunt-cli/node_modules/findup-sync/index.js:12:10)
```
Related: micromatch/micromatch#183, gruntjs/grunt-cli#145
This happens when attempting to build Traffic Portal from CentOS 7 using `nodejs` installed from EPEL (version `1:6.17.1`)
## Expected behavior:
<!-- Describe what the behavior would be without the bug -->
Building Traffic Portal should succeed using the build constraints in the Traffic Portal RPM spec and the dependencies installed in the Traffic Portal builder image.
## Steps to reproduce:
<!-- If the current behavior is a bug, please provide the *STEPS TO REPRODUCE* and
include the applicable TC version.
-->
Build Traffic Portal targeting RHEL 7 and building the Traffic Portal builder image:
```shell
./pkg -vb7 traffic_portal_build
```
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] shamrickus commented on issue #6171: Building Traffic Portal: SyntaxError: Unexpected token ...
Posted by GitBox <gi...@apache.org>.
shamrickus commented on issue #6171:
URL: https://github.com/apache/trafficcontrol/issues/6171#issuecomment-915144662
Traffic Portal requires `nodejs >= 12.0`
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 commented on issue #6171: Building Traffic Portal: SyntaxError: Unexpected token ...
Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6171:
URL: https://github.com/apache/trafficcontrol/issues/6171#issuecomment-915197284
Node 8's <abbr title="End of Life">EOL</abbr> was 2019-12-31 - can the builder not use/require a Node version that is still receiving security updates?
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] zrhoffman commented on issue #6171: Building Traffic Portal: SyntaxError: Unexpected token ...
Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #6171:
URL: https://github.com/apache/trafficcontrol/issues/6171#issuecomment-915298971
> Node 8's EOL was 2019-12-31 - can the builder not use/require a Node version that is still receiving security updates?
Sure we can, using a `BuildRequires` constraint.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] ocket8888 commented on issue #6171: Building Traffic Portal: SyntaxError: Unexpected token ...
Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6171:
URL: https://github.com/apache/trafficcontrol/issues/6171#issuecomment-915334722
To be fair, idk if that would actually solve the problem without looking at what version of V8 each Node version uses and which of those V8 versions implemented the ES6 object spread operator. But hopefully we can kill two birds with one stone here.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] shamrickus removed a comment on issue #6171: Building Traffic Portal: SyntaxError: Unexpected token ...
Posted by GitBox <gi...@apache.org>.
shamrickus removed a comment on issue #6171:
URL: https://github.com/apache/trafficcontrol/issues/6171#issuecomment-915144662
Traffic Portal requires `nodejs >= 12.0`
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] zrhoffman commented on issue #6171: Building Traffic Portal: SyntaxError: Unexpected token ...
Posted by GitBox <gi...@apache.org>.
zrhoffman commented on issue #6171:
URL: https://github.com/apache/trafficcontrol/issues/6171#issuecomment-915347334
The breakage is caused by installing the very latest `grunt-cli` version, which now uses a version of `micromatch` incompatible with NodeJS 6:
https://github.com/apache/trafficcontrol/blob/a971b6c50b6a429ddbbbdfd2ca8ff1107b659eb8/infrastructure/docker/build/Dockerfile-traffic_portal#L60
So, an alternative way of fixing the build issue would be changing that to
```js
npm -g install grunt-cli@v1.3.2
```
which would make it build using NodeJS 6 again. But that would mean including a build note in the docs that, if you're building using a NodeJS version < 8.0.0, you'll need to use an older `grunt-cli` version, too. Requiring a newer NodeJS version seems cleaner.
We should still pin the `grunt-cli` version used, ofc
--
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.
To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org