ESM issue upgrading from 2.0.16 into 2.0.17 / update-notifier
See original GitHub issue- Versions: node@v16.14.2, darwin@21.5.0
nodemon -v: 2.0.16- Operating system/terminal environment (powershell, gitshell, etc): OSX 12.4 / fish
- Using Docker? What image: no
- Command you ran:
nodemon --config nodemon.json src/index.js
Expected behaviour
Work as in v2.0.17
Actual behaviour
…/node_modules/nodemon/bin/nodemon.js:15
require('update-notifier')({ pkg }).notify();
^
Error [ERR_REQUIRE_ESM]: require() of ES Module …/node_modules/update-notifier/index.js from …/node_modules/nodemon/bin/nodemon.js not supported.
Instead change the require of index.js in …/node_modules/nodemon/bin/nodemon.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (…node_modules/nodemon/bin/nodemon.js:15:3) {
code: 'ERR_REQUIRE_ESM'
}
Steps to reproduce
upgrade from v2.0.16 into v2.0.17
If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.
Issue Analytics
- State:
- Created a year ago
- Reactions:14
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Releases · remy/nodemon · GitHub
Replace update notifier with simplified deps (#2033) (176c4a6), closes #1961 #2028 ... revert update-notifier forcing esm (1b3bc8c) ... 2.0.17 (2022-06-23).
Read more >update-manager and update-notifier packages won't upgrade ...
After this, update-manager and update-notifier were both automatically upgraded/installed in my machine. To check, I tried to run another update ...
Read more >Upgrading to v2 - Chakra UI
Upgrade steps#. Here is a list of steps to migrate your project to v2. 1. Update your dependencies#. Make sure you update ......
Read more >Project dependencies - D2iQ Help Center
gopkg.in, yaml.v1, v1.0.0-20140924161607-9f9df34309c0, LGPL-3.0. gopkg.in, yaml.v2 ... colorette, 2.0.16, MIT ... update-notifier, 5.1.0, BSD-2-Clause.
Read more >nodemon: Versions | Openbase
2.0.17. 6 months ago. 2.0.17 (2022-06-23) Bug Fixes. bump update-notifier to v6.0.0 ... wait for all subprocesses to terminate (fixes issue #1476) (0e6ba3c)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Release going up now. I need to find time to drop that module entirely… 😮💨
@alexbrazier the thread is here on that very topic: https://github.com/remy/nodemon/issues/1961
I just don’t have the time and no one else has proposed (or pushed) anything that aligns with what I want for this project.
2.0.18 is live now - which reverts back. Ideally the next release drops update-notifier entirely.
@Garamani you shouldn’t see the same issue unless you’ve somehow managed to bump update-notifier to 6 (which, shouldn’t happen at all - check your
npm ls).