nodemon not running due to requires update notifier package

Kaizen Tamashi picture Kaizen Tamashi · Apr 15, 2018 · Viewed 10.4k times · Source

When I typed "nodemon server.js" command in the terminal, it returns the error "require('update-notifier')({ pkg }).notify();". The version of nodemon installed is [email protected]

enter image description here

Below are the javascript and html used.

Answer

Marcos Casagrande picture Marcos Casagrande · Apr 15, 2018

That error is telling that your node version does not support object literal property value shorthand, which was introduced in node 4, which is the required version for nodemon.

You should update your node version, since it's not a nodemon issue.

To provide further proof, executing nodemon on a docker container with node 0.12.15 installed trigger that exact same error.

Node 0.12.15

enter image description here

And it doesn't happen on node >= 4

enter image description here

I recommend updating your node version to 8.11.1 which is the current LTS


If you can't upgrade your node version (which you should), you can downgrade nodemon to version 1.11.0 which runs on node >= 0.8.

enter image description here