Closed alsGitHub270 closed 7 years ago
With the auto update to 1.19, script-runner no longer works. Nor does platformio-ide-terminal(another post). I've tried uninstalling, re-installing, npm rebuild, apm upgrade, nothing seems to work .
That's odd, it definitely works, because I'm using almost the same setup as you for testing.
Can you please try deleting ~/.atom/package/script-runner
and then reinstall the package? Let me know if you have the same problem.
As an aside, don't use npm
to build atom packages.
I deleted the script-runner directory and re-installed script-runner from within atom. Exactly the same incompatible error message.
I checked my setup and most of the versions I have are the same as you. Something on your system might be causing an issue, but it's hard to know exactly what.
I only had this issue before when I tried to install script-runner
with npm install accidentally, and it used the system node.js
install instead of the one that comes with atom, and hence it got compiled with the wrong version.
Is it some how possible you have multiple copies of Atom installed?
This problem occurred following the upgrade of atom to 1.19.0 on Monday. It has since been updated to 1.19.1 behind the scenes. Script-runner was installed prior to this. I installed it from the 'install' section of settings, so I don't know if it's installed via npm. I assume it is installed using apm. I have since uninstalled, deleted the folder as you suggested, and re-installed. The problem still exists. As an FYI, this started happening the same time the package platfomio-ide-terminal failed due to "some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom". I'm still trying to work this out.
In ~/.atom/packages/script-runner
try deleting node_modules
. Then, in that directory, run apm install
. Restart Atom. See if it works.
No effect:
what's the output of apm config list
Sorry, how to I get that apm config list?
run it in the terminal
Sorry, brain cramp.
I just saw something that may be revelant or not: I have my machine to run python 3.6 on a 'python' command. I see above python 2.7.
^_^ > apm config get python
/opt/local/bin/python2.7
^_^ > npm config get python
/opt/local/bin/python2.7
^_^ > /opt/local/bin/python2.7 --version
Python 2.7.13
What about the version of /usr/bin/python2.7
? Does that actually start python2.7?
From what I can see you are okay w.r.t. python versions.
npm config ls -l
; cli configs
long = true
user-agent = "npm/2.15.12 node/v7.10.0 darwin x64"
my version of npm is older than yours. I wonder if that's the issue?
python2.7 works:
npm, Could that have happened with the upgrade? I think yesterday I might have done an npm rebuild or npm install working on the platformio issue.
Essentially, the error you are receiving means that apm didn't use the version of Node included in the Atom app. It's building the packages with the wrong Node version. You nominally have one version of Node on your system, and another which is embedded within the Atom.app
package. Basically, script-runner
needs to be built with the one included with Atom, otherwise it builds the native libraries against the wrong API versions. Hence the error while trying to load node-pty
which is the only native dependency I'm aware of. node-pty
on your system appears to be getting built against your system's node install, but it should be using the one in the Atom app. Perhaps try downloading a fresh copy of Atom and put it in /Applications
. Then trying mv ~/.atom /.atom-old
and reinstalling all packages.
Another thing I'm not sure about is, perhaps the newer version of npm uses a cache, and it's not rebuilding the dependency because it gets it from your system cache (rather than building it fresh for Atom's node install). Perhaps check what packages you have installed globally, and make sure node-pty
is not one of them (uninstall it if it is).
didn't change anything. Now, I did not completely uninstall atom. I copied over what was displayed as the Atom icon into Applications (where my previous copy was). I moved the .atom to .atom-old. Now, no packages were displayed. I installed script-runner as the only package, and got the same error message:
What happened when I moved .atom to .atom-old. It's totally gone, along with all the other packages that I had installed.
You can move it back, it contains user config for atom.
The problem must be with your system some how, did you check if node-pty was installed in your system?
Can you try updating all your globally installed packages?
sudo npm update -g
Then try reinstalling:
cd ~/.atom/packages/script-runner
rm -rf node_modules
apm install
No change. But what I've notice is that with my problem, as well as a number of others, with platformio-ide-terminal also not working is that that package has two node.py for compiling(?)
With script-runner, there is no multiple builds. How can I tell if pty.node is build 49 instead of 53?
Why is it that both my issues occurred after Atom 1.19 was released?
I think that some of the build tools were updated.
We had luck with npm update -g
which seems to have updated some global dependencies which were causing problems here: https://discuss.atom.io/t/solved-cannot-find-module-build-release-pty-node/46224
@ioquatix: I just changed the theme on Atom, and lo and behold, a button now to the right of the incompatible message was displayed to 'Rebuild Packages'. I had seen that comment in other comments, but could not see it on my machine. With the new theme, it became visible, and it rebuilt everything. Script-runner now runs like a champ. I appreciate your time and efforts on this. Al
Okay great :) I'm happy it is working for you now.