Closed csvan closed 3 years ago
We have started seeing this as of this morning, possibly a broken upstream change:
[36mhost_1 | [1] [0] /workdir/node_modules/yeoman-environment/lib/util/binary-diff.js:4 [36mhost_1 | [1] [0] const dateFormat = require('dateformat'); [36mhost_1 | [1] [0] ^ [36mhost_1 | [1] [0] [36mhost_1 | [1] [0] Error [ERR_REQUIRE_ESM]: require() of ES Module /workdir/node_modules/yeoman-environment/node_modules/dateformat/lib/dateformat.js from /workdir/node_modules/yeoman-environment/lib/util/binary-diff.js not supported. [36mhost_1 | [1] [0] Instead change the require of dateformat.js in /workdir/node_modules/yeoman-environment/lib/util/binary-diff.js to a dynamic import() which is available in all CommonJS modules. [36mhost_1 | [1] [0] at Object. (/workdir/node_modules/yeoman-environment/lib/util/binary-diff.js:4:20) [36mhost_1 | [1] [0] at Object. (/workdir/node_modules/yeoman-environment/lib/util/conflicter.js:8:20) [36mhost_1 | [1] [0] at Object. (/workdir/node_modules/yeoman-environment/lib/environment.js:28:20) [36mhost_1 | [1] [0] at Object. (/workdir/node_modules/@ccsdk/scripts/src/index.js:9:16) [36mhost_1 | [1] [0] at Object. (/workdir/node_modules/@ccsdk/scripts/src/bin/index.js:4:1) { [36mhost_1 | [1] [0] code: 'ERR_REQUIRE_ESM' [36mhost_1 | [1] [0] }
@csvan Fixed in version 4.6.3 of dateformat package: https://www.npmjs.com/package/dateformat
4.6.3
dateformat
Is this back in 5.0.3 now?
i try used npm i --save-dev npm i dateformat@4.6.3, i fixed error
We have started seeing this as of this morning, possibly a broken upstream change: