Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nod_ created an issue. See original summary.

nod_’s picture

Status: Active » Needs review
FileSize
65.68 KB

not too happy with the patch, removing the typeof doesn't seem to work everywhere, don't know why.

nod_’s picture

longwave’s picture

Seems to be considered a bug in Node itself but can't really tell whether this will be fixed or it is just intended behaviour now: https://github.com/nodejs/node/issues/32107

dww’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

No longer applies after #3107926: Update stylelint to ^13.0.0 landed.

xjm’s picture

Priority: Major » Critical

This seems to be happening in a couple (but not all) of our test environments now (PHP dev version environments for some reason?), so bumping to critical.
https://dispatcher.drupalci.org/job/drupal8_core_regression_tests/21714/...
https://dispatcher.drupalci.org/job/drupal8_core_regression_tests/21713/...
https://dispatcher.drupalci.org/job/drupal8_core_regression_tests/21717/...

xjm’s picture

22:02:49    Error: An error occurred while trying to start the Nightwatch Runner: No "exports" main resolved in /var/www/html/core/node_modules/@babel/helper-compilation-targets/package.json
dww’s picture

patch -p1 < core-js-babel-3143289-1.patch gave: 4 out of 48 hunks FAILED. :/

This patch keeps the js changes from #1, resets yarn.lock to commit b086cafd9, then runs:

yarn upgrade '@babel/core'
yarn upgrade '@babel/preset-env'

Output attached. Interdiff doesn't work, rawdiff is huge. Hope this is the kind of re-roll we need.

After running this, yarn run build:js doesn't error.

dww’s picture

Looking at the parent issue and the title here, maybe we should also yarn upgrade @babel/register?

xjm’s picture

Queued the above against the environments that are failing in HEAD.

xjm’s picture

catch’s picture

Those 'build successful' results are exposing the error as expected:

./node_modules/.bin/nightwatch --config ./tests/Drupal/Nightwatch/nightwatch.conf.js
14:47:06    Error: An error occurred while trying to start the Nightwatch Runner: No "exports" main resolved in /var/www/html/core/node_modules/@babel/helper-compilation-targets/package.json
tedbow’s picture

Queued a new more tests for #9, to see if consistently passes and #11, to see if it consistently fails.

tedbow’s picture

I test building patch as per @dww instruction in #8 and #9

  1. git checkout 9.1.x
  2. git checkout b086cafd9 -- core/yarn.lock(not sure we are doing this, just to get the previous patch to apply?)
  3. rm -rf node_modules
  4. Do changes to core/package.json from #1(not the actual js file changes)
  5. yarn install
  6. yarn upgrade '@babel/core'
    yarn upgrade '@babel/preset-env'
    yarn upgrade @babel/register
    
  7. yarn build:js

The result of this matches the patch in #9
I don't understand Step 2). If this was just temp fix I can re-roll without this.

tedbow’s picture

Assigned: Unassigned » tedbow

Rebuilding without reseting yarn.lock

tedbow’s picture

re my question in #14 and @dww's comment #8

resets yarn.lock to commit b086cafd9

I rebuilt the patch according to #14 except #14.2

The changes still came out the same as #9

tedbow’s picture

Assigned: tedbow » Unassigned
Status: Needs review » Reviewed & tested by the community

The patch looks good to me.

+++ b/core/package.json
@@ -65,6 +65,9 @@
+        "exclude": [
+          "transform-es2015-typeof-symbol"
+        ],

@@ -78,6 +81,9 @@
+        "exclude": [
+          "transform-es2015-typeof-symbol"
+        ],

The only thing I don't about is this as to whether it would cause a problem but since @nod_ suggested this as Javascript maintainer he should know if removing typeof would not work everywhere, see #2

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
83.54 KB
+++ b/core/yarn.lock
@@ -650,163 +728,187 @@
-"@babel/preset-env@^7.0.0":
-  version "7.8.3"
...
+"@babel/preset-env@^7.0.0":
+  version "7.10.2"

Wouldn't doing just this be enough since this has been fixed in the preset-env library? At least this fixed it for me.

nod_’s picture

Status: Needs review » Reviewed & tested by the community

Patch #18 is better, fixes the root cause without side effects.

xjm’s picture

Issue summary: View changes

This one is less scary dependency-wise; just a minor update for Babel and a handful of patch- and minor-level updates. No added dependencies outside the Babel scope.
https://docs.google.com/spreadsheets/d/1wm6tObzNMZwcDnA3mqgXDlGyV94i-m7s...

xjm’s picture

Issue tags: +9.0.0 release notes
dww’s picture

Sorry for any confusion from #8. I was trying to show I was using the (then) head of 9.1.x version of yarn.lock before I started the yarn upgrade commands.

+1 that #18 is RTBC: solves the build errors locally, with fewer changes, and is RTBC.

Thanks!
-Derek

lauriii’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

This was resolved by #3118741: [Security] Update yarn dependencies to fix security issues. Everyone from this issue have been given credit on that issue.