ImportError: No module named parser


#1

Hello, I have some workspaces configured in the server, however when we open any of those workspaces we get the next error:

> pty.js@0.3.0 install /home/dev-jose/.c9/node_modules/pty.js
> node-gyp rebuild

Traceback (most recent call last):
  File "/home/dev-jose/.c9/node/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 13, in <module>
    import gyp
  File "/home/dev-jose/.c9/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 8, in <module>
    import gyp.input
  File "/home/dev-jose/.c9/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 5, in <module>
    from compiler.ast import Const
  File "/usr/local/lib/python2.7/compiler/__init__.py", line 29, in <module>
    from compiler.transformer import parse, parseFile
  File "/usr/local/lib/python2.7/compiler/transformer.py", line 29, in <module>
    import parser
ImportError: No module named parser
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/dev-jose/.c9/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.17.8-x86_64-linode110
gyp ERR! command "/home/dev-jose/.c9/node/bin/node" "/home/dev-jose/.c9/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dev-jose/.c9/node_modules/pty.js
gyp ERR! node -v v4.4.6
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm ERR! Linux 4.17.8-x86_64-linode110
npm ERR! argv "/home/dev-jose/.c9/node/bin/node" "/home/dev-jose/.c9/node/bin/npm" "install" "--production" "pty.js@0.3.0"
npm ERR! node v4.4.6
npm ERR! npm  v2.15.5
npm ERR! code ELIFECYCLE

npm ERR! pty.js@0.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pty.js@0.3.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pty.js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls pty.js
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/dev-jose/.c9/npm-debug.log

Failed npm. Exit code 1

One or more errors occured. Please try to resolve them and restart Cloud9 or contact support@c9.io.

Then in the debug file I get:

331 verbose rebuildBundles extend@1.2.1
332 info install extend@1.2.1
333 info postinstall extend@1.2.1
334 verbose unlock done using /home/dev-jose/.c9/tmp/.npm/_locks/extend-3f235ad998ff6d21.lock for /home/dev-jose/.c9/node_modules/pty.js/node_modules/extend
335 verbose write writing to /home/dev-jose/.c9/node_modules/pty.js/node_modules/nan/package.json
336 info preinstall nan@2.0.5
337 verbose readDependencies loading dependencies from /home/dev-jose/.c9/node_modules/pty.js/node_modules/nan/package.json
338 verbose readDependencies loading dependencies from /home/dev-jose/.c9/node_modules/pty.js/node_modules/nan/package.json
339 silly install resolved []
340 verbose about to build /home/dev-jose/.c9/node_modules/pty.js/node_modules/nan
341 info build /home/dev-jose/.c9/node_modules/pty.js/node_modules/nan
342 info linkStuff nan@2.0.5
343 silly linkStuff nan@2.0.5 has /home/dev-jose/.c9/node_modules/pty.js/node_modules as its parent node_modules
344 verbose linkBins nan@2.0.5
345 verbose linkMans nan@2.0.5
346 verbose rebuildBundles nan@2.0.5
347 info install nan@2.0.5
348 info postinstall nan@2.0.5
349 verbose unlock done using /home/dev-jose/.c9/tmp/.npm/_locks/nan-532f67876d1f6fe2.lock for /home/dev-jose/.c9/node_modules/pty.js/node_modules/nan
350 verbose about to build /home/dev-jose/.c9/node_modules/pty.js
351 info build /home/dev-jose/.c9/node_modules/pty.js
352 info linkStuff pty.js@0.3.0
353 silly linkStuff pty.js@0.3.0 has /home/dev-jose/.c9/node_modules as its parent node_modules
354 verbose linkBins pty.js@0.3.0
355 verbose linkMans pty.js@0.3.0
356 verbose rebuildBundles pty.js@0.3.0
357 verbose rebuildBundles [ 'extend', 'nan' ]
358 info install pty.js@0.3.0
359 verbose unsafe-perm in lifecycle true
360 info pty.js@0.3.0 Failed to exec install script
361 verbose unlock done using /home/dev-jose/.c9/tmp/.npm/_locks/pty-js-178522585242116f.lock for /home/dev-jose/.c9/node_modules/pty.js
362 verbose stack Error: pty.js@0.3.0 install: `node-gyp rebuild`
362 verbose stack Exit status 1
362 verbose stack     at EventEmitter.<anonymous> (/home/dev-jose/.c9/node/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
362 verbose stack     at emitTwo (events.js:87:13)
362 verbose stack     at EventEmitter.emit (events.js:172:7)
362 verbose stack     at ChildProcess.<anonymous> (/home/dev-jose/.c9/node/lib/node_modules/npm/lib/utils/spawn.js:24:14)
362 verbose stack     at emitTwo (events.js:87:13)
362 verbose stack     at ChildProcess.emit (events.js:172:7)
362 verbose stack     at maybeClose (internal/child_process.js:827:16)
362 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
363 verbose pkgid pty.js@0.3.0
364 verbose cwd /home/dev-jose/.c9
365 error Linux 4.17.8-x86_64-linode110
366 error argv "/home/dev-jose/.c9/node/bin/node" "/home/dev-jose/.c9/node/bin/npm" "install" "--production" "pty.js@0.3.0"
367 error node v4.4.6
368 error npm  v2.15.5
369 error code ELIFECYCLE
370 error pty.js@0.3.0 install: `node-gyp rebuild`
370 error Exit status 1
371 error Failed at the pty.js@0.3.0 install script 'node-gyp rebuild'.
371 error This is most likely a problem with the pty.js package,
371 error not with npm itself.
371 error Tell the author that this fails on your system:
371 error     node-gyp rebuild
371 error You can get information on how to open an issue for this project with:
371 error     npm bugs pty.js
371 error Or if that isn't available, you can get their info via:
371 error
371 error     npm owner ls pty.js
371 error There is likely additional logging output above.
372 verbose exit [ 1, true ]
373 verbose unbuild node_modules/pty.js
374 info preuninstall pty.js@0.3.0
375 info uninstall pty.js@0.3.0
376 verbose unbuild rmStuff pty.js@0.3.0 from /home/dev-jose/.c9/node_modules
377 info postuninstall pty.js@0.3.0
378 silly gentlyRm /home/dev-jose/.c9/node_modules/pty.js is being purged from base /home/dev-jose/.c9
379 verbose gentlyRm don't care about contents; nuking /home/dev-jose/.c9/node_modules/pty.js
380 silly vacuum-fs purging /home/dev-jose/.c9/node_modules/pty.js
381 silly vacuum-fs quitting because other entries in /home/dev-jose/.c9/node_modules

I had a very old version of npm installed (2.x) now I have v10.8.0

What can/should I do to fix that problem?