apm does not (appear) to have the same node version as atom #328
Comments
apm compiles all native modules against the v8 headers that ship with Atom. What error are you getting when |
The error is
|
Doing some more testing with the node-sass 3.0.0 beta which uses running
run the command
which returns a vastly different answer and using that information would give the binding I get during install. |
Sure, but many npm modules include build scripts that do things like try to stamp the library with the node or v8 version to detect ABI version skew. Those scripts make the reasonable assumption that they are building for the version of node which is executing the script. But under apm, these scripts are run using node 0.10, so they get confused and use that version for the stamp, even if they are actually building against newer headers.
Why is Atom shipping this old node binary when Atom proper is running on something much newer? |
@kentonv There have been attempts in the past to upgrade apm to something newer, but I believe they all ran into some difficulties (one particular one that I'm aware of is that all commands fail on 0.12+). |
I just ran in to this same problem, also with node-sass. Did you ever find a solution @Arcath, or was it just concluded that node-sass, atom and windows just won't work at the moment? |
@Dhq I ended up using node-sass in a child process which isn't ideal but it works for now. |
apm and Atom are now on similar enough Node versions that I think this can be closed. |
@50Wliu Well, in the case of node-sass at least it still doesn't work. On my windows machine, apm installs bindings in node-sass for win32 with node 4.x, while inside Atom it seems to be looking for a win32 on node 5.X.
|
Atom is using Node 4: https://github.com/atom/atom/blob/master/appveyor.yml#L15 |
@50Wliu Ok, thanks. Can't understand why it's looking for node 5.X for me then. My global node locally is 6.0.0... Will try to find it out :) |
@Dhq After doing some investigation, I've come to the conclusion that my above comment was wrong. Sorry about that. What appears to be happening is that while Atom is built using Node 4 on Appveyor, it still inherits Electron's Node version. We currently use Electron 0.37.8, which uses Node 5.10.0. |
When installing node-sass it compiles a binding for your os/node version which it then calls later when you require it.
When install via
apm install
it creates (on my machine)win32-ia32-node-0.10
which is rightly not my system node version. If i then try to requirenode-sass
in my package I get the error that no binding is available and I should re-install node-sass.Looking at the
process.sassBinaryName
in Atom it is looking forwin32-ia32-atom-1.0
Should apm not be using an identical environment to Atom so that any module that compiles anything will work when required in Atom?
The text was updated successfully, but these errors were encountered: