Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

platformio-ide-terminal installation failed #637

Closed
DeathExploit opened this issue Jan 26, 2019 · 18 comments
Closed

platformio-ide-terminal installation failed #637

DeathExploit opened this issue Jan 26, 2019 · 18 comments

Comments

@DeathExploit
Copy link

DeathExploit commented Jan 26, 2019

Whenever I try to download the package platformio-ide-terminal it refuses to download and shows me the following error message:

node-pty-prebuilt@0.7.6 install C:\Users\alhut\AppData\Local\Temp\apm-install-dir-119026-6712-62men8.flm04\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt
prebuild-install || node scripts/install.js

C:\Users\alhut\AppData\Local\Temp\apm-install-dir-119026-6712-62men8.flm04\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt>if not defined npm_config_node_gyp (node "C:\Users\alhut\AppData\Local\atom\app-1.34.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\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\bin\\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --build_v8_with_gn=false ) 

prebuild-install WARN install unexpected end of file
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Users\\alhut\\AppData\\Local\\atom\\app-1.34.0\\resources\\app\\apm\\bin\\node.exe',
gyp verb cli   'C:\\Users\\alhut\\AppData\\Local\\atom\\app-1.34.0\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--build_v8_with_gn=false' ]
gyp info using node-gyp@3.4.0
gyp info using node@8.9.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21) code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python D:\PythonExec\python.EXE
gyp verb check python version `D:\PythonExec\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.6.0\r\n"
gyp ERR! configure error 
gyp ERR! stack Error: Python executable "D:\PythonExec\python.EXE" is v3.6.0, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\node-gyp\lib\configure.js:454:14)
gyp ERR! stack     at C:\Users\alhut\AppData\Local\atom\app-1.34.0\resources\app\apm\node_modules\node-gyp\lib\configure.js:443:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:267:7)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Users\\alhut\\AppData\\Local\\atom\\app-1.34.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\alhut\\AppData\\Local\\atom\\app-1.34.0\\resources\\app\\apm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--build_v8_with_gn=false"
gyp ERR! cwd C:\Users\alhut\AppData\Local\Temp\apm-install-dir-119026-6712-62men8.flm04\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\alhut\AppData\Local\Temp\apm-install-dir-119026-6712-62men8.flm04\package.json'
npm WARN apm-install-dir-119026-6712-62men8.flm04 No description
npm WARN apm-install-dir-119026-6712-62men8.flm04 No repository field.
npm WARN apm-install-dir-119026-6712-62men8.flm04 No README data
npm WARN apm-install-dir-119026-6712-62men8.flm04 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\alhut\.atom\.apm\_logs\2019-01-26T13_58_15_171Z-debug.log

and I don't know what to do.

P.S. This is the error message that appears with npm-install installed.

@dobromyslov
Copy link

Same thing on Win 10.
Needs to install python 2.7 for windows first from https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi in the default folder on C:

But if you install Python 3.x this will also will not work.

@DeathExploit
Copy link
Author

DeathExploit commented Jan 27, 2019

Same thing on Win 10.
Needs to install python 2.7 for windows first from https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi in the default folder on C:

But if you install Python 3.x this will also will not work.

See thats the problem; I use python 3

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Jan 27, 2019

I have python 3.5.2 default install and it works just fine. Its working even better now with 2.9.0 many bugs I experienced fixed like #546 #608 and a few others.

When I had issues or discovered issues it was just a case of resetting Atom to defaults, and unistalling + deletion of the platformio-ide-terminal folder/remnants from Atom, then re-installing via apm.

This is the best Ive seen platformio-ide-terminal work with 2.9.0

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Feb 7, 2019

Also regarding python error

gyp ERR! stack Error: Python executable "D:\PythonExec\python.EXE" is v3.6.0, which is not supported by gyp.

So open a ticket @node-gyp and as a workaround downgrade python to 3.5.2 which I know works fine, but to be safe, go with python 2.7.

> apm -v

apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.34.0
python 3.5.2
git 2.20.1.windows.1
visual studio

> atom -v

Atom    : 1.34.0
Electron: 2.0.16
Chrome  : 61.0.3163.100
Node    : 8.9.3

platformio-ide-terminal version: 2.9.0
Os Windows 10 pro 1803 build 17134.556

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Feb 7, 2019

For the record, node-gyp 3.4.0 is called by apm https://github.com/atom/apm/blob/master/package.json

@daviwil could answer this better since he is involved with both node-pty-prebuilt and apm though hes an extremely busy guy.

@the-j0k3r
Copy link
Collaborator

Reminder:

Any installation issues are to/should be reported to apm issue tracker platformio-ide-terminal cannot control apm which is responsible for installs of all atom plugins and their dependencies anyway, so thanks in advance for your understanding in these matters.

@imal1
Copy link

imal1 commented Jun 19, 2019

I met the same issure. It may not be an apm issue. I have tried clean cache of atom, apm and node. But the installation was still failed.

these is VERSIONS:

apm 2.2.4
npm 6.2.0
node 8.9.3 x64
atom 1.39.0-beta2
python 2.7.16
git 2.20.1.windows.1
visual studio
node-gyp 5.0.0

Here's a part of DEBUG LOG:

2119 warn enoent ENOENT: no such file or directory, open 'C:\Users\admin\AppData\Local\Temp\apm-install-dir-119519-21132-1mbyks.z9usz\package.json'
2120 verbose enoent This is related to npm not being able to find a file.
2121 warn apm-install-dir-119519-21132-1mbyks.z9usz No description
2122 warn apm-install-dir-119519-21132-1mbyks.z9usz No repository field.
2123 warn apm-install-dir-119519-21132-1mbyks.z9usz No README data
2124 warn apm-install-dir-119519-21132-1mbyks.z9usz No license field.
2125 verbose stack Error: node-pty-prebuilt@0.7.6 install: prebuild-install || node scripts/install.js
2125 verbose stack Exit status 1
2125 verbose stack at EventEmitter. (C:\Users\admin\AppData\Local\atom\app-1.39.0-beta2\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
2125 verbose stack at emitTwo (events.js:126:13)
2125 verbose stack at EventEmitter.emit (events.js:214:7)
2125 verbose stack at ChildProcess. (C:\Users\admin\AppData\Local\atom\app-1.39.0-beta2\resources\app\apm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
2125 verbose stack at emitTwo (events.js:126:13)
2125 verbose stack at ChildProcess.emit (events.js:214:7)
2125 verbose stack at maybeClose (internal/child_process.js:925:16)
2125 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
2126 verbose pkgid node-pty-prebuilt@0.7.6
2127 verbose cwd C:\Users\admin\AppData\Local\Temp\apm-install-dir-119519-21132-1mbyks.z9usz
2128 verbose Windows_NT 10.0.17134
2129 verbose argv "C:\Users\admin\AppData\Local\atom\app-1.39.0-beta2\resources\app\apm\bin\node.exe" "C:\Users\admin\AppData\Local\atom\app-1.39.0-beta2\resources\app\apm\node_modules\npm\bin\npm-cli.js" "--globalconfig" "C:\Users\admin\.atom\.apm\.apmrc" "--userconfig" "C:\Users\admin\.atom\.apmrc" "install" "https://www.atom.io/api/packages/platformio-ide-terminal/versions/2.9.1/tarball" "--runtime=electron" "--target=3.1.10" "--dist-url=https://atom.io/download/electron" "--arch=x64" "--global-style"
2130 verbose node v8.9.3
2131 verbose npm v6.2.0
2132 error code ELIFECYCLE
2133 error errno 1
2134 error node-pty-prebuilt@0.7.6 install: prebuild-install || node scripts/install.js
2134 error Exit status 1
2135 error Failed at the node-pty-prebuilt@0.7.6 install script.
2135 error This is probably not a problem with npm. There is likely additional logging output above.
2136 verbose exit [ 1, true ]

Please check it, thanks!

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Jun 19, 2019

Again, apm is responsible for all installations, theres is nothing this project can do about it.

Also @imal1 your Atom beta 1.39 is 100% unsupported by node-pty-prebuilt 0.7.6 because theres no windows binaries for your Node/Electron versions. See #700 (comment)

EDit: OK your Atom 1.39.0 is beta2 so it still has supported node/electron versions. or maybe not because you are customizing things.
Your debug log though says

2119 warn enoent ENOENT: no such file or directory, open 'C:\Users\admin\AppData\Local\Temp\apm-install-dir-119519-21132-1mbyks.z9usz\package.json'
and
2129 verbose argv "C:\Users\admin\AppData\Local\atom\app-1.39.0-beta2\resources\app\apm\bin\node.exe" "C:\Users\admin\AppData\Local\atom\app-1.39.0-beta2\resources\app\apm\node_modules\npm\bin\npm-cli.js" "--globalconfig" "C:\Users\admin\.atom\.apm\.apmrc" "--userconfig" "C:\Users\admin\.atom\.apmrc" "install" "https://www.atom.io/api/packages/platformio-ide-terminal/versions/2.9.1/tarball" "--runtime=electron" "--target=3.1.10" "--dist-url=https://atom.io/download/electron" "--arch=x64" "--global-style"

"--runtime=electron" "--target=3.1.10" is not supported by node-pty-prebuilt 0.7.6 max is 2.0.0

Still re: Installation failure. Go report any such failures to apm, literally nothing this project can do fix installation failures.

@imal1
Copy link

imal1 commented Jun 19, 2019

So, I changed to Atom release version 1.38.2 and the installation was success, thanks.
Maybe its helpful to others who have a similar problem and some problems for Atom beta version should be reported to apm developers.

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Jun 19, 2019

Where node-pty-prebuilt has not published higher abi binaries for electron/node for beta Atom version in the given platform that should be reported to node-pty-prebuilt repo.

The problem is users report it to this repo, and we have literally no control over how apm/node-pty-prebuilt work or what they support to the applicable release.

Maybe its helpful to others who have a similar problem and some problems for Atom beta version should be reported to apm developers.

All such installation issues should be reported to apm, no exceptions, though I bet no one (that reports them issue here) does the right thing.

Im glad its working now.

@the-j0k3r
Copy link
Collaborator

@maxjkim It means it wasnt able to download the packages. please report that to APM issue tracker.

@UziTech

This comment has been minimized.

@AugustoPiva
Copy link

node-pty-prebuilt@0.7.6 install C:\Users\augus\AppData\Local\Temp\apm-install-dir-119623-1608-mxov6b.uksfg\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt
prebuild-install || node scripts/install.js

C:\Users\augus\AppData\Local\Temp\apm-install-dir-119623-1608-mxov6b.uksfg\node_modules\platformio-ide-terminal\node_modules\node-pty-prebuilt>if not defined npm_config_node_gyp (node "C:\Users\augus\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\augus\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\augus\Anaconda3\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Users\augus\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. (C:\Users\augus\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\augus\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\augus\AppData\Local\atom\app-1.39.0\resources\app\apm\bin\node.exe" "C:\Users\augus\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\augus\AppData\Local\Temp\apm-install-dir-119623-1608-mxov6b.uksfg\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\augus\AppData\Local\Temp\apm-install-dir-119623-1608-mxov6b.uksfg\package.json'
npm WARN apm-install-dir-119623-1608-mxov6b.uksfg No description
npm WARN apm-install-dir-119623-1608-mxov6b.uksfg No repository field.
npm WARN apm-install-dir-119623-1608-mxov6b.uksfg No README data
npm WARN apm-install-dir-119623-1608-mxov6b.uksfg 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\augus.atom.apm_logs\2019-07-23T22_15_03_865Z-debug.log

Which problem I'm facing?

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Jul 24, 2019

People report it here because node-pty-prebuilt is a dependency of this software. If node-pty-prebuilt doesn't work with current electron/node versions than this software has control over using a different dependency that does work.

@UziTech The issues reported here are not related to node-pty-prebuilt not supporting higher node/electron versions, (e.g. the report above perfect example its a node-gyp issue), and node-pty-prebuilt issues are a completely separate issue. As for what other dependency would work, please open a separate issue or PR. Also node-pty-prebuilt/node-gyp failures are to be reported to their respective projects. Reporting everything here is not helpful to anyone as this is not those projects.

Which problem I'm facing?

@AugustoPiva Its node-pty-prebuilt failed to rebuild the binaries for your OS, open a issue at https://github.com/daviwil/node-pty-prebuilt/issues/new

@UziTech

This comment has been minimized.

@the-j0k3r
Copy link
Collaborator

@UziTech offtopic, please open a new issue to talk about possible replacements.

@AugustoPiva
Copy link

For windows 10 I just run npm install --global --production windows-build-tools in powershell as administrator. That command also installed me python2.7 and solved platformio-ide-terminal installation.
Make sure to rebuild the package

@the-j0k3r
Copy link
Collaborator

@AugustoPiva thanks for bring this issue to our attention.

This is a duplicate of #700 see #707 (comment) for a possible workaround

@platformio platformio locked as resolved and limited conversation to collaborators Jul 25, 2019
@the-j0k3r the-j0k3r unpinned this issue Aug 4, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants