Can't install any packges -help

Today in the morning i was coding with terminal called platformio, but suddenly it stopped working and said it needed rebuild, i uninstalled it and installed again and the installation failed. Then i tried to install term3 and termination and the same happened “installation failed”. I don’t know what to do and it seems strange because everything was working just fine some hours ago, i have to finish a project and i am panicking. any clues?
here is the error when installing platformio:

> node-pty-prebuilt@0.7.6 install C:\Users\Usuario\AppData\Local\Temp\apm-install-dir-119623-7388-m4mcne.qq0u8\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt
> prebuild-install || node scripts/install.js


C:\Users\Usuario\AppData\Local\Temp\apm-install-dir-119623-7388-m4mcne.qq0u8\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt>if not defined npm_config_node_gyp (node "C:\Users\Usuario\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --build_v8_with_gn=false )  else (node "C:\Users\Usuario\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --build_v8_with_gn=false ) 

prebuild-install WARN install No prebuilt binaries found (target=3.1.10 runtime=electron arch=x64 libc= platform=win32)
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "C:\Users\Usuario\.platformio\penv\Scripts\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Usuario\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Usuario\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack     at C:\Users\Usuario\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\Usuario\\AppData\\Local\\atom\\app-1.39.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\Usuario\\AppData\\Local\\atom\\app-1.39.0\\resources\\app\\apm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--build_v8_with_gn=false"
gyp ERR! cwd C:\Users\Usuario\AppData\Local\Temp\apm-install-dir-119623-7388-m4mcne.qq0u8\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Usuario\AppData\Local\Temp\apm-install-dir-119623-7388-m4mcne.qq0u8\package.json'
npm WARN apm-install-dir-119623-7388-m4mcne.qq0u8 No description
npm WARN apm-install-dir-119623-7388-m4mcne.qq0u8 No repository field.
npm WARN apm-install-dir-119623-7388-m4mcne.qq0u8 No README data
npm WARN apm-install-dir-119623-7388-m4mcne.qq0u8 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty-prebuilt@0.7.6 install: `prebuild-install || node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-pty-prebuilt@0.7.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!     C:\Users\Usuario\.atom\.apm\_logs\2019-07-23T19_37_02_134Z-debug.log
1 Like

Your Atom version was updated.

Which are you using (stable, beta, nightly)? I’ve only seen this issue affect nightly. And if not nightly, how did you install Atom?

This thread is identical to another one you posted recently. Please limit yourself to one thread per question.

I installed the normal version on Atom’s website

this exact same thing just happened to me, im using the normal stable channel as well and i can tell it updated and now i can’t use any of my old packages, i tried reinstalling atom but it just wont let me install any packages

Any is a broad statement; are you unable to install https://atom.io/packages/toggle-quotes? The original issue is caused by native C++ modules as a dependency, which up until now have had prebuilt binaries that match the Node version used by Atom. Now that it doesn’t match, you have to build it locally. The original error says

gyp ERR! stack Error: Can't find Python executable "C:\Users\Usuario\.platformio\penv\Scripts\python.EXE", you can set the PYTHON env variable.

(which is different to what I was referring to regarding nightly). You need to have Python 2.7 installed for the build to work.

As for a terminal package specifically, platformio-ide-terminal is no longer receiving support. I recommend termination. It’s dependencies should still have binaries compatible with Atom 1.39 (and 1.40-beta). It needs a small CSS tweak to work in the status bar properly though

// ~/.atom/styles.less
.termination.status-bar {
  display: inline-flex;
}

oh youre right its not every package just most of the ones i used

i was able to get that one, but couldnt get termination to work and every other terminal i try gives me this problem https://github.com/platformio/platformio-atom-ide-terminal/issues/508

Hey, for the gyp error it looks like you don’t have python binaries. I’m pretty sure you need those in order to do what your doing. I assume your using a rebuild, can you tell me what device your on? E.G. MAC, WINDOWS, LINUX.

I can give an answer since I have exactly the same problem.

Windows 7 Professional machine.

Here is the log produced by Atom.

node-pty-prebuilt@0.7.6 install C:\Users\LABTEC~1\AppData\Local\Temp\apm-install-dir-119624-3700-6t1hbz.6lqd4\node_modules\termination\node_modules\node-pty-prebuilt
prebuild-install || node scripts/install.js

C:\Users\LABTEC~1\AppData\Local\Temp\apm-install-dir-119624-3700-6t1hbz.6lqd4\node_modules\termination\node_modules\node-pty-prebuilt>if not defined npm_config_node_gyp (node “C:\Users\LabTechSupport-Disp\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp.js” rebuild --build_v8_with_gn=false ) else (node “C:\Users\LabTechSupport-Disp\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” rebuild --build_v8_with_gn=false )
Building the projects in this solution one at a time. To enable parallel build, please add the “/m” switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component “VCBuild.exe”. To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\LABTEC~1\AppData\Local\Temp\apm-install-dir-119624-3700-6t1hbz.6lqd4\node_modules\termination\node_modules\node-pty-prebuilt\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component “VCBuild.exe”. To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\Users\LABTEC~1\AppData\Local\Temp\apm-install-dir-119624-3700-6t1hbz.6lqd4\node_modules\termination\node_modules\node-pty-prebuilt\build\binding.sln]

prebuild-install WARN install No prebuilt binaries found (target=3.1.10 runtime=electron arch=x64 libc= platform=win32)
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\LabTechSupport-Disp\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command “C:\Users\LabTechSupport-Disp\AppData\Local\atom\app-1.39.0\resources\app\apm\bin\node.exe” “C:\Users\LabTechSupport-Disp\AppData\Local\atom\app-1.39.0\resources\app\apm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild” “–build_v8_with_gn=false”
gyp ERR! cwd C:\Users\LABTEC~1\AppData\Local\Temp\apm-install-dir-119624-3700-6t1hbz.6lqd4\node_modules\termination\node_modules\node-pty-prebuilt
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\LABTEC~1\AppData\Local\Temp\apm-install-dir-119624-3700-6t1hbz.6lqd4\package.json’
npm WARN apm-install-dir-119624-3700-6t1hbz.6lqd4 No description
npm WARN apm-install-dir-119624-3700-6t1hbz.6lqd4 No repository field.
npm WARN apm-install-dir-119624-3700-6t1hbz.6lqd4 No README data
npm WARN apm-install-dir-119624-3700-6t1hbz.6lqd4 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty-prebuilt@0.7.6 install: prebuild-install || node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty-prebuilt@0.7.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I have tried installing node.js and node-gyp from scratch and that has not helped either.

A (hopefully) temporary fix

I was able to download Atom v. 1.38.2 x64 from GitHub and re-installed platformio-setup-terminal and everything works perfectly.

So obviously something has happened in the jump from v 1.38 to 1.39. It has nothing to do with the Python binaries.

It seems to be something in the build procedure for these packages.

Note: if you follow my above procedure, please go to Help --> About Atom and uncheck the “Automatically Download Updates” checkbox or else you will be back in the same position soon!

I too am having the same exact problem with a different terminal package. I tried several other terminal packages and got the same error each time. As suggested by @APengelly, I went back to v 1.38.2 x64 and it seems to be working again.

1 Like

The upgrade from 1.38 to 1.39 came with an upgrade of Electron, from 2 to 3. This makes native modules written in C++ no longer compatible.

The errors you are all facing are due to missing requirements to rebuild these packages locally. Unfortunately, while prebuilt binaries existed for earlier Atom versions, they do not exist (yet) for the current Electron version in use.

1 Like

Unfortunately @APengelly, I do not think you can stop Atom from updating and going back to version 1.39. :frowning: I’ve unchecked that option, but Atom installs it anyway on the next reload! How are you keeping it from going to 1.39? A quick Google search tells me that others are having my same problem.

This is extremely frustrating. I’m back to square one. I cannot use a terminal and I cannot stick with version 1.38.2. ARGH!

1 Like

I had this happen. I can’t guarantee that this is the reason why mine is not updating, but I did clear my downloads folder of the 1.39 download, and only kept the 1.38 x64 download in the downloads folder. Since then it has not tried to update. Fingers crossed.

Unfortunately in the last hour, Atom has completely stopped working on my Windows 10 machine unless I run it in safe mode. I love Atom, but frankly, I’ve had more trouble with it over the years than any other editor I’ve used. I’m trying really hard not to bail on it… :frowning:

Downloading the .zip and running from there will 100% protect you from autoupdate behavior. Does Atom function when you do that?

The problem persists. I will “limit” advisories. NewUser as of today, is it just me or do you folks need a case of Jolt Cola and several pizzas?

The package authors are the ones who need pizzas. The version upgrade inside Atom isn’t going to change and it’s only a breaking change in cases where a native binary is prebuilt (many packages that are designed with Windows in mind, because Windows is frequently configured without Python and the compiler tools that all Linux and Mac machines have by default).

I’m not a dev, just an active user with a lot of free time to hang around here and answer questions.

As a neophyte, I erred. How should the ‘packagers’ be addressed?

Thank you for the guidance.