? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
14 Mar 2021

Pull Request for Issue #32315 (comment) .

Summary of Changes

In node v14 you can write const { access } = require('fs/promises'); which is equivalent to const { access } = require('fs').promises; but it's not ok for v12. So, this PR reverts to the v12 notation

Testing Instructions

npm ci doesn't throw on v12

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

No, this is a bug and my mistake

avatar dgrammatiko dgrammatiko - open - 14 Mar 2021
avatar dgrammatiko dgrammatiko - change - 14 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2021
Category JavaScript Repository
avatar wilsonge wilsonge - close - 14 Mar 2021
avatar wilsonge wilsonge - merge - 14 Mar 2021
avatar wilsonge wilsonge - change - 14 Mar 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-03-14 11:43:19
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 14 Mar 2021

Thanks!

avatar richard67 richard67 - test_item - 14 Mar 2021 - Tested successfully
avatar richard67
richard67 - comment - 14 Mar 2021

I have tested this item successfully on aabb94b

Without the PR using node version 12:

> joomla@4.0.0 install
> node build/build.js --prepare

internal/modules/cjs/loader.js:797
    throw err;
    ^

Error: Cannot find module 'fs/promises'
Require stack:
- /home/richard/lamp/public_html/joomla-cms-4.0-dev/build/build-modules-js/javascript/compile-to-es2017.es6.js
- /home/richard/lamp/public_html/joomla-cms-4.0-dev/build/build-modules-js/compilejs.es6.js
- /home/richard/lamp/public_html/joomla-cms-4.0-dev/build/build.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/richard/lamp/public_html/joomla-cms-4.0-dev/build/build-modules-js/javascript/compile-to-es2017.es6.js:1:20)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/richard/lamp/public_html/joomla-cms-4.0-dev/build/build-modules-js/javascript/compile-to-es2017.es6.js',
    '/home/richard/lamp/public_html/joomla-cms-4.0-dev/build/build-modules-js/compilejs.es6.js',
    '/home/richard/lamp/public_html/joomla-cms-4.0-dev/build/build.js'
  ]
}
npm ERR! code 1
npm ERR! path /home/richard/lamp/public_html/joomla-cms-4.0-dev
npm ERR! command failed
npm ERR! command sh -c node build/build.js --prepare

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/richard/.npm/_logs/2021-03-14T10_05_53_879Z-debug.log

With node version 14 no problem.

With the PR no problem with node version 12, and 14 also still ok.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32686.
avatar richard67
richard67 - comment - 14 Mar 2021

George was some 44 seconds faster than me ?

Add a Comment

Login with GitHub to post a comment