-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cashify 3.0+ Breaking Changes - Node.js v17.2.0 ERR_REQUIRE_ESM #20
Comments
I mentioned the transition to ESM both in the changelog and README. |
The standard thing to do is to put a header near the top of your README that says BREAKING CHANGES in bold and explain the change there. Furthermore, your changes break the module in NodeJS. Out of thousands of modules that I have used in my years of using NodeJS this is the first module to completely break the loading mechanism using require. This is also the first module to not specifically announce BREAKING CHANGES at the top of the README. Your changes also makes this section of your README inaccurate https://github.com/xxczaki/cashify#migrating-from-moneyjs aka a lie. Suggestion: Make require work by allowing an async module loader so import is not forced as majority of people using Node are still using require and do not want to asynchronously setup a workaround to require a module. PS: Looking at your download statistics based on version it is pretty clear you have disenfranchised many people with these breaking changes. https://www.npmjs.com/package/cashify <-- click versions tab at the top
3.0.1
3.0.0
2.5.0
2.4.4
2.4.3
|
@talkquazi I am maintaining an ES2017 fork of this package at https://www.npmjs.com/package/cashify-es2017 , which means it can be used as any other package. |
Breaking changes to version 3.0+ of cashify has the following breaking changes that you did not mention in your Readme.
`const { Cashify } = require('cashify');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module .\node_modules\cashify\dist\index.js from .\lib\currency.js not supported.
Instead change the require of index.js in .\lib\currency.js to a dynamic import() which is available in all CommonJS modules.
at Object. (.\lib\currency.js:1:21)
at Object. (.\lib\amazonProfit.js:32:18)
at .\server.js:64:26
at Object.init (.\lib\ssl.js:65:7)
at .\server.js:50:7
at .\node_modules\entourage\lib\entourage.js:126:9
at wrapper (.\node_modules\async\dist\async.js:271:20)
at iteratorCallback (.\node_modules\async\dist\async.js:501:17)
at .\node_modules\async\dist\async.js:327:20
at .\node_modules\entourage\lib\entourage.js:117:11
at .\node_modules\async\dist\async.js:2557:44
at eachOfArrayLike (.\node_modules\async\dist\async.js:506:13)
at eachOf (.\node_modules\async\dist\async.js:626:16)
at awaitable (.\node_modules\async\dist\async.js:211:32)
at Object.eachLimit (.\node_modules\async\dist\async.js:2660:16)
at Object.awaitable (.\node_modules\async\dist\async.js:211:32)
at .\node_modules\entourage\lib\entourage.js:100:11
at f (.\node_modules\once\once.js:25:25)
at Glob. (.\node_modules\entourage\node_modules\glob\glob.js:148:7)
at Glob.emit (node:events:390:28)
at Glob._finish (.\node_modules\entourage\node_modules\glob\glob.js:194:8)
at done (.\node_modules\entourage\node_modules\glob\glob.js:179:14)
at Glob._processSimple2 (.\node_modules\entourage\node_modules\glob\glob.js:703:3)
at .\node_modules\entourage\node_modules\glob\glob.js:673:10
at Glob.stat2 (.\node_modules\entourage\node_modules\glob\glob.js:786:10)
at lstatcb (.\node_modules\entourage\node_modules\glob\glob.js:761:12)
at RES (.\node_modules\inflight\inflight.js:31:16)
at f (.\node_modules\once\once.js:25:25)
at FSReqCallback.oncomplete (node:fs:199:5) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v17.2.0`
The text was updated successfully, but these errors were encountered: