require() of ES Module ./node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js from ./node_modules/chartjs-node-canvas/dist/freshRequire.js not supported. Instead change the require of chartjs-adapter-luxon.esm.js in ./node_modules/chartjs-node-canvas/dist/freshRequire.js to a dynamic import() which is available in all CommonJS modules.
I have tried to narrow it down for a long time, then finally figured that one ^ character in the beginning was hidden it ^v1.2.1 = 1.3.1 but 1.2.1 = 1.2.1.
Specifying 1.2.1 in package.json made it work again as before.
Sharing this here because it cased me many hours of investigation and head scratching hoping to save time for others.
As I now know - this PR https://github.com/chartjs/chartjs-adapter-luxon/pull/79/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 broken our application due to the changes in package.json.
require() of ES Module ./node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js from ./node_modules/chartjs-node-canvas/dist/freshRequire.js not supported. Instead change the require of chartjs-adapter-luxon.esm.js in ./node_modules/chartjs-node-canvas/dist/freshRequire.js to a dynamic import() which is available in all CommonJS modules.
I have tried to narrow it down for a long time, then finally figured that one
^
character in the beginning was hidden it^v1.2.1
= 1.3.1 but1.2.1
= 1.2.1.Specifying
1.2.1
in package.json made it work again as before.