new version update

What I Wanted to Do

i wanted to update the npm version to newer version,

What Happened Instead

i downloaded update and wanted test my .js file

i received error —

/usr/local/bin/npm: line 2: syntax error near unexpected token ;' /usr/local/bin/npm: line 2:;(function () { // wrapper in case were in module_context mode’

Reproduction Steps

do not have any instruction

Details

/usr/local/bin/npm: line 2: syntax error near unexpected token ;' /usr/local/bin/npm: line 2:;(function () { // wrapper in case were in module_context mode’

Platform Info

node.js

$ npm --versions
<!-- error -->
$ node -p process.platform

<!-- darwin -->

How did you update npm? It looks like a it might be a broken install.

(The node installer includes a version of npm so one way to try fixing npm is reinstall node. Then you can use npm install -g npm@latest )

1 Like

Thank You for your advice.
Job done :white_check_mark:

1 Like