Can't install ink package

Hey everyone,

I’m trying to install ink but I keep getting this error:

 ~> apm install ink
Installing ink to /home/durand/.atom/packages ✗

> ink@0.9.2 postinstall /tmp/apm-install-dir-118627-21140-6lav6e/node_modules/ink
> node scripts/postinstall.js

└── (empty)

  const {

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/tmp/apm-install-dir-118627-21140-6lav6e/node_modules/ink/node_modules/replace-in-file/index.js:1:80)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-118627-21140-6lav6e/package.json'
npm WARN apm-install-dir-118627-21140-6lav6e No description
npm WARN apm-install-dir-118627-21140-6lav6e No repository field.
npm WARN apm-install-dir-118627-21140-6lav6e No README data
npm WARN apm-install-dir-118627-21140-6lav6e No license field.
npm ERR! Linux 4.4.0-131-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/durand/.atom/.apm/.apmrc" "--userconfig" "/home/durand/.atom/.apmrc" "install" "/tmp/d-118627-21140-1hzqga9/package.tgz" "--runtime=electron" "--target=1.3.13" "--arch=x64" "--global-style"
npm ERR! node v4.4.5
npm ERR! npm  v3.10.5

npm ERR! ink@0.9.2 postinstall: `node scripts/postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ink@0.9.2 postinstall script 'node scripts/postinstall.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ink package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/postinstall.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ink
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ink
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-118627-21140-6lav6e/npm-debug.log
npm ERR! code 1

I installed juno a while ago but ink has failed to update for months due to the same error…

Thanks in advance.

Do you have the latest versions of these installed?

1 Like

I just installed the latest version of node but it seems like atom ships with a much older version of it.

durand@Deuterium:~$ /usr/share/atom/resources/app/apm/bin/node --version

durand@Deuterium:~$ node --version

Still get the same error :confused:

What version of Atom are you using?

1 Like

Aha, that was my issue! I thought atom updated automatically but it turns out you still have to manually update it through your system package manager. Whoops. Thanks!

Great, glad it works for you now :slight_smile: