node.js - upgrading NPM runs out of memory -


i attempting install new angular module had created other projects use it. however, npm returns error:

fatal error: call_and_retry_last allocation failed - javascript heap out of memory

after doing research, there seem 2 solutions.

  • upgrade npm
  • run npm through node , pass in max_old_space_size argument

however, i'm running issues both approaches. process of upgrading npm returns same error. so... tried second approach. however, following error:

(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
^^^^^ syntaxerror: unexpected identifier
@ createscript (vm.js:56:10)
@ object.runinthiscontext (vm.js:97:10)
@ module._compile (module.js:542:28)
@ object.module._extensions..js (module.js:579:10)
@ module.load (module.js:487:32)
@ trymoduleload (module.js:446:12)
@ function.module._load (module.js:438:3)
@ module.runmain (module.js:604:10)
@ run (bootstrap_node.js:389:7)
@ startup (bootstrap_node.js:149:9)

seeing i'm running on windows, figure supposed pass in npm.cmd argument node. instead, following error:

(function (exports, require, module, __filename, __dirname) { ::
^
created npm, please don't edit manually.
syntaxerror: unexpected token :
@ createscript (vm.js:56:10)
@ object.runinthiscontext (vm.js:97:10)
@ module._compile (module.js:542:28)
@ object.module._extensions..js (module.js:579:10)
@ module.load (module.js:487:32)
@ trymoduleload (module.js:446:12)
@ function.module._load (module.js:438:3)
@ module.runmain (module.js:604:10)
@ run (bootstrap_node.js:389:7)
@ startup (bootstrap_node.js:149:9)

any ideas on how can resolve this?

p.s. tried installing v8.2.1 of node comes npm v5.3.0. giving other issues involving symlinks.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -