Apm update on different versions of node


#1

Running the apm update command on three different versions of node are giving me some issues:

node -v 0.10.26

npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/Users/kasperlewau/code/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! System Darwin 13.0.2
npm ERR! command "/usr/local/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js" "--userconfig" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/.apmrc" "install" "--target=0.11.10" "--arch=x64"
npm ERR! cwd /Users/kasperlewau/code/work/autobutler
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.3.18
npm ERR! path /Users/kasperlewau/code/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/kasperlewau/code/npm-debug.log
npm ERR! not ok code 0

node -v 0.11.10

/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/node_modules/bindings/bindings.js:83
        throw e
              ^
Error: Module version mismatch. Expected 13, got 11.
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)
    at Module.require (module.js:357:17)
    at require (module.js:373:17)
    at bindings (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/lib/keytar.js:4:31)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/lib/keytar.js:58:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:349:32)

node -v 0.11.11

/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/node_modules/bindings/bindings.js:83
        throw e
              ^
Error: Module did not self-register.
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)
    at Module.require (module.js:357:17)
    at require (module.js:373:17)
    at bindings (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/lib/keytar.js:4:31)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/keytar/lib/keytar.js:58:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:349:32)

I’ve tried going into the source of install.js and locate the issue but have yet to succeed. It seems to be somewhere around the installModules() call to forInstallCommand().

Is anyone else having troubles with the apm updatecommand? For now I’ll just stick to cd’ing into each package directory and update from there while I try to figure out whats going on.


#2

It should be noted that I’m sticking with the stable version for my analysis at the bottom, as that was the only version that would run the apm command itself.


#3

Hi, apm does require node 0.10.x

The next release of Atom will bundle node with apm removing the need to have node already installed to run apm.


#4

Also, to your 0.10.x issue, does your package.json have a dependencies section?

If it doesn’t, can you try setting "dependencies": {} and re-running apm update?