Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With the release of nodejs 12.17.0 our compiling script have an issue and we get a lot of
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in core/node_modules/@babel/helper-compilation-targets/package.json
Dependency updates
https://docs.google.com/spreadsheets/d/1wm6tObzNMZwcDnA3mqgXDlGyV94i-m7s...
Comment | File | Size | Author |
---|---|---|---|
#18 | 3143289-18.patch | 83.54 KB | lauriii |
#11 | js-test.patch | 388 bytes | xjm |
#9 | 3143289-9.patch | 95.74 KB | dww |
#8 | 3143289-8.patch | 93.88 KB | dww |
#2 | core-js-babel-3143289-1.patch | 65.68 KB | nod_ |
Comments
Comment #2
nod_not too happy with the patch, removing the typeof doesn't seem to work everywhere, don't know why.
Comment #3
nod_Comment #4
longwaveSeems 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
Comment #5
dwwNo longer applies after #3107926: Update stylelint to ^13.0.0 landed.
Comment #6
xjmThis 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/...
Comment #7
xjmComment #8
dwwpatch -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:
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.Comment #9
dwwLooking at the parent issue and the title here, maybe we should also
yarn upgrade @babel/register
?Comment #10
xjmQueued the above against the environments that are failing in HEAD.
Comment #11
xjmJust a test patch to expose the fails in HEAD (I hope),
Comment #12
catchThose 'build successful' results are exposing the error as expected:
Comment #13
tedbowQueued a new more tests for #9, to see if consistently passes and #11, to see if it consistently fails.
Comment #14
tedbowI test building patch as per @dww instruction in #8 and #9
git checkout 9.1.x
git checkout b086cafd9 -- core/yarn.lock
(not sure we are doing this, just to get the previous patch to apply?)rm -rf node_modules
core/package.json
from #1(not the actual js file changes)yarn install
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.
Comment #15
tedbowRebuilding without reseting yarn.lock
Comment #16
tedbowre my question in #14 and @dww's comment #8
I rebuilt the patch according to #14 except #14.2
The changes still came out the same as #9
Comment #17
tedbowThe patch looks good to me.
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 #2Comment #18
lauriiiWouldn't doing just this be enough since this has been fixed in the preset-env library? At least this fixed it for me.
Comment #19
nod_Patch #18 is better, fixes the root cause without side effects.
Comment #20
xjmThis 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...
Comment #21
xjmComment #22
dwwSorry 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
Comment #23
lauriiiThis was resolved by #3118741: [Security] Update yarn dependencies to fix security issues. Everyone from this issue have been given credit on that issue.