1

First of all, I did see the similar documents:

Node.js TypeError: Object function Object() { [native code] } has no method 'assign'

TypeError: Object function Object() { [native code] } has no method 'method'

However..

I am using node version 0.10.48 (my app uses deprecated node api so I rather stay on this version).

whenever I try to install a new module, or even run scripts that require modules, I receive the following error: typeerror object function object() native code has no method 'assign'

I cannot even use npm v or npm install/uninstall..

How do I get rid of this error? I simply cannot do anything on the terminal :(

user5618793
  • 101
  • 5
  • 13

1 Answers1

0

You could try this: https://nodejs.org/en/download/package-manager/#osx

curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"

Worked for me on Amazon Linux as well (different command).

issues17886 (https://github.com/npm/npm/issues/17996)

Lee Derting
  • 146
  • 1
  • 4