fand / veda

⚡VJ / Live Coding on Atom⚡
http://veda.gl/
MIT License
509 stars 34 forks source link

Does not update to 2.14.2 in Atom #245

Closed davidjonas closed 4 years ago

davidjonas commented 4 years ago

Hi! That's a great tool you've got here. I absolutely love it. I am getting an error updating Veda to 2.14.2 within atom. Here's the output:

Updating to “veda@2.14.2” failed.Hide output…

> ffmpeg-static@4.2.6 install /tmp/apm-install-dir-120712-8397-1rgnkj4.yo5m/node_modules/veda/node_modules/ffmpeg-static
> node install.js

/tmp/apm-install-dir-120712-8397-1rgnkj4.yo5m/node_modules/veda/node_modules/ffmpeg-static/install.js:52
  url = new URL(url)
  ^

ReferenceError: URL is not defined
    at normalizeS3Url (/tmp/apm-install-dir-120712-8397-1rgnkj4.yo5m/node_modules/veda/node_modules/ffmpeg-static/install.js:52:3)
    at Object.<anonymous> (/tmp/apm-install-dir-120712-8397-1rgnkj4.yo5m/node_modules/veda/node_modules/ffmpeg-static/install.js:61:3)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-120712-8397-1rgnkj4.yo5m/package.json'
npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN apm-install-dir-120712-8397-1rgnkj4.yo5m No description
npm WARN apm-install-dir-120712-8397-1rgnkj4.yo5m No repository field.
npm WARN apm-install-dir-120712-8397-1rgnkj4.yo5m No README data
npm WARN apm-install-dir-120712-8397-1rgnkj4.yo5m No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ffmpeg-static@4.2.6 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ffmpeg-static@4.2.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/david/.atom/.apm/_logs/2020-08-12T09_18_36_337Z-debug.log

Just wanted to let you know. Thanks a lot!

davidjonas commented 4 years ago

And here's the tail of the log file:

9856 warn enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-120712-8397-1rgnkj4.yo5m/package.json'
9857 verbose enoent This is related to npm not being able to find a file.
9858 warn ws@7.3.1 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
9859 warn ws@7.3.1 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
9860 warn apm-install-dir-120712-8397-1rgnkj4.yo5m No description
9861 warn apm-install-dir-120712-8397-1rgnkj4.yo5m No repository field.
9862 warn apm-install-dir-120712-8397-1rgnkj4.yo5m No README data
9863 warn apm-install-dir-120712-8397-1rgnkj4.yo5m No license field.
9864 verbose stack Error: ffmpeg-static@4.2.6 install: `node install.js`
9864 verbose stack Exit status 1
9864 verbose stack     at EventEmitter.<anonymous> (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
9864 verbose stack     at emitTwo (events.js:126:13)
9864 verbose stack     at EventEmitter.emit (events.js:214:7)
9864 verbose stack     at ChildProcess.<anonymous> (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
9864 verbose stack     at emitTwo (events.js:126:13)
9864 verbose stack     at ChildProcess.emit (events.js:214:7)
9864 verbose stack     at maybeClose (internal/child_process.js:925:16)
9864 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
9865 verbose pkgid ffmpeg-static@4.2.6
9866 verbose cwd /tmp/apm-install-dir-120712-8397-1rgnkj4.yo5m
9867 verbose Linux 4.15.0-111-generic
9868 verbose argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/david/.atom/.apm/.apmrc" "--userconfig" "/home/david/.atom/.apmrc" "install" "https://www.atom.io/api/packages/veda/versions/2.14.2/tarball" "--runtime=electron" "--target=2.0.11" "--dist-url=https://atom.io/download/electron" "--arch=x64" "--global-style"
9869 verbose node v8.9.3
9870 verbose npm  v6.2.0
9871 error code ELIFECYCLE
9872 error errno 1
9873 error ffmpeg-static@4.2.6 install: `node install.js`
9873 error Exit status 1
9874 error Failed at the ffmpeg-static@4.2.6 install script.
9874 error This is probably not a problem with npm. There is likely additional logging output above.
9875 verbose exit [ 1, true ]
fand commented 4 years ago

Thanks @davidjonas ! The error is shown because one of the library which VEDA uses doesn't support old versions of Node.js...😣 Installing latest Node.js to your PC will fix the problem.

davidjonas commented 4 years ago

Thanks a lot for the reply! Problem is solved but it was a bit confusing to solve so I describe the solution here in case someone else comes by this issue: I am on Ubuntu 18.04.5 LTS I had the latest version of Node as far as I could tell:

$ node --version
v14.9.0
$ npm --version
6.14.8

Same output on a root shell so the version is the same on all users. But the problem was still happening....

Then I thought, could it be that atom is using its own older node? The answer was yes:

$ atom --version
Atom    : 1.33.0
Electron: 2.0.11
Chrome  : 61.0.3163.100
Node    : 8.9.3

Turns out I was using apt's latest version of atom which (unsurprisingly) is old and self-contains its own node that is ancient. So I installed Atom again with:

wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
sudo apt-get update
sudo apt-get install atom

and boom... problem solved. Thanks a lot for the tip!!

Cheers, David Jonas