You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating node from version 12.13.0 to 12.13.1, I'm seeing the warning below when running npm ci:
> fetch-mock@8.0.1 postinstall C:\Users\jljob\projects\repos\work\vehicle-turnaround\ui\node_modules\fetch-mock
> node scripts/support-fetch-mock.js
(node:24100) Warning: require() of ES modules is not supported.
require() of C:\Users\jljob\projects\repos\work\vehicle-turnaround\ui\node_modules\fetch-mock\scripts\support-fetch-mock.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename support-fetch-mock.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\Users\jljob\projects\repos\work\vehicle-turnaround\ui\node_modules\fetch-mock\package.json.
This is from this Node change. Unfortunately it is causing our build to fail on our CI server.
Reproduction steps:
Update node to version 12.13.1 (currently the latest LTS version)
In an empty folder run npm init and accept all default values
Run npm install fetch-mock
The warning above should be displayed.
Do any of the fixes suggested in the warning sound like they're a good fit for the project? (renaming the file to .cjs sounds the simplest to me)
The text was updated successfully, but these errors were encountered:
(node:2528) Warning: require() of ES modules is not supported.
require() of C:\Users\xmr\Desktop\web\node_modules\fetch-mock\scripts\support-fetch-mock.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename support-fetch-mock.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from C:\Users\xmr\Desktop\web\node_modules\fetch-mock\package.json.
After updating node from version
12.13.0
to12.13.1
, I'm seeing the warning below when runningnpm ci
:This is from this Node change. Unfortunately it is causing our build to fail on our CI server.
Reproduction steps:
12.13.1
(currently the latest LTS version)npm init
and accept all default valuesnpm install fetch-mock
The warning above should be displayed.
Do any of the fixes suggested in the warning sound like they're a good fit for the project? (renaming the file to
.cjs
sounds the simplest to me)The text was updated successfully, but these errors were encountered: