atom-community / atom-ide-javascript

JavaScript support for Atom IDE
https://atom.io/packages/atom-ide-javascript
Other
17 stars 5 forks source link

Can't install package #12

Closed delucca closed 4 years ago

delucca commented 4 years ago

Hi!

I'm trying to install atom-ide-javascript in my fresh Atom installation, but not being able to do it.

Here is the output:

business@budproj on  feature/get-key-result [✘!?] via ⬢ v15.0.0
❯ apm install prettier-atom
Installing prettier-atom to /home/odelucca/.atom/packages ✗

> core-js@2.6.11 postinstall /tmp/apm-install-dir-20201017-554432-lvi9wt.epdum/node_modules/atom-ide-javascript/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN lifecycle The node binary used for scripts is /home/odelucca/.asdf/shims/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
unknown command: node. Perhaps you have to reshim?
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-20201017-554432-lvi9wt.epdum/package.json'
npm WARN apm-install-dir-20201017-554432-lvi9wt.epdum No description
npm WARN apm-install-dir-20201017-554432-lvi9wt.epdum No repository field.
npm WARN apm-install-dir-20201017-554432-lvi9wt.epdum No README data
npm WARN apm-install-dir-20201017-554432-lvi9wt.epdum No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! core-js@2.6.11 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the core-js@2.6.11 postinstall 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/odelucca/.atom/.apm/_logs/2020-11-17T21_35_42_583Z-debug.log

Can anyone help me?

IMPORTANT I'm using asdf as my NodeJS version manager. Don't know if it is related to it.

aminya commented 4 years ago

The error you are showing is for prettier-atom and not atom-ide-javascript.

As shown in the log, it seems the issue is related to asdf. We don't support asdf version manager. Could you try to install the package using this link?

https://atom.io/packages/atom-ide-javascript

delucca commented 4 years ago

Hi!

I've saw the same error with prettier-atom, Ive probably mixed the logs, but they're pretty much the same.

I've also tried installing it directly in atom, with your provided link, and the result is the same.

delucca commented 4 years ago

@aminya here is the log when I try to install it inside Atom:

> core-js@2.6.11 postinstall /tmp/apm-install-dir-20201017-705202-13craah.rt5jf/node_modules/atom-ide-javascript/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN lifecycle The node binary used for scripts is /home/odelucca/.asdf/shims/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
unknown command: node. Perhaps you have to reshim?
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-20201017-705202-13craah.rt5jf/package.json'
npm WARN apm-install-dir-20201017-705202-13craah.rt5jf No description
npm WARN apm-install-dir-20201017-705202-13craah.rt5jf No repository field.
npm WARN apm-install-dir-20201017-705202-13craah.rt5jf No README data
npm WARN apm-install-dir-20201017-705202-13craah.rt5jf No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! core-js@2.6.11 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the core-js@2.6.11 postinstall 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/odelucca/.atom/.apm/_logs/2020-11-18T00_37_09_786Z-debug.log
aminya commented 4 years ago

Well, I said the problem is with your setup. It does not matter what package you install.

It shows that the problem is with asdf/shims/node.

The node binary used for scripts is /home/odelucca/.asdf/shims/node but npm is using /usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
unknown command: node. Perhaps you have to reshim?

In normal situations, apm uses its bundled Node. I am not sure what you have changed here that it uses .asdf/shims/node.

delucca commented 4 years ago

Oh, I see.

I'm going to dig into asdf and see if there is a proper solution there.

Thanks

delucca commented 4 years ago

That is strange, because even after reshim the issue persists. And it seems that node is properly linked:

business@budproj on  feature/get-key-result via ⬢ v15.0.0 took 22s
❯ which node
/home/odelucca/.asdf/shims/node
delucca commented 4 years ago

Well, it was an issue with asdf indeed. I've moved from asdf to nvm.