Skip to content

Conversation

@dgrammatiko
Copy link
Contributor

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

@wilsonge wilsonge merged commit 4bc8bb1 into joomla:4.0-dev Mar 14, 2021
@wilsonge
Copy link
Contributor

Thanks!

@wilsonge wilsonge added this to the Joomla 4.0 milestone Mar 14, 2021
@richard67
Copy link
Member

I have tested this item ✅ successfully on aabb94b

Without the PR using node version 12:

> [email protected] 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.

@dgrammatiko dgrammatiko deleted the patch-13 branch March 14, 2021 11:43
@richard67
Copy link
Member

George was some 44 seconds faster than me 😄

dgrammatiko added a commit to dgrammatiko/joomla-cms that referenced this pull request Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants