User tests: Successful: Unsuccessful:
Pull Request for Issue #32315 (comment) .
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
npm ci
doesn't throw on v12
No, this is a bug and my mistake
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository |
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:
?
|
I have tested this item
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.
George was some 44 seconds faster than me
Thanks!