Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Packages Fail on this Atom build #12

Open
fusion809 opened this issue Jun 6, 2016 · 30 comments
Open

Terminal Packages Fail on this Atom build #12

fusion809 opened this issue Jun 6, 2016 · 30 comments

Comments

@fusion809
Copy link

Hi,

I have noticed that after switching from atom-editor to your package, I was asked to recompile my terminal packages (specifically terminal-plus and its fork platformio-ide-terminal). After they were re-compiled, however, when I tried to open a new terminal with them I was left with:

that is, terminal-plus failed to load my shell (Zsh). I have tried to start platformio-ide-terminal too in Atom and it too failed to load my shell. It was working fine prior to switching to your package though. Any ideas on a solution? I think I will tag @platformio and @ivankravets as they are the principal developers of platformio-ide-terminal, and @jeremyramin, the principal developer of terminal-plus.

Thanks for your time,
Brenton

@fusion809
Copy link
Author

If it helps here is my developer's console log while attempting to load terminal-plus:

Window load time: 370ms
::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
Uncaught (in promise) TypeError: Cannot read property 'red' of undefined()
Error refreshing repository status:
Error: Failed to resolve path '/home/fusion809/GitHub/mine/websites/fusion809.github.io/devmanual.gentoo.org': No such file or directory()
Error refreshing repository status:
Error: Failed to resolve path '/home/fusion809/GitHub/mine/websites/fusion809.github.io/galleria': No such file or directory()
Cannot find module '../build/Release/pty.node'
Module version mismatch. Expected 48, got 46. ELECTRON_ASAR.js:158
        return old.apply(this, arguments)
                   ^
Error: Module version mismatch. Expected 48, got 46.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/terminal-plus/node_modules/pty.js/lib/pty.js:17:9)
    at Module._compile (module.js:541:32)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/terminal-plus/node_modules/pty.js/index.js:2:18)
    at Module._compile (module.js:541:32)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/terminal-plus/lib/process.coffee:1:7)
    at Object.<anonymous> (/home/fusion809/.atom/packages/terminal-plus/lib/process.coffee:1:1)
    at Module._compile (module.js:541:32)
    at Object.value [as .coffee] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
Cannot read property 'bind' of null TypeError: Cannot read property 'bind' of null
    at process.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:82:23)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at handleMessage (internal/child_process.js:718:10)
    at Pipe.channel.onread (internal/child_process.js:444:11)
Error refreshing repository status:
Error: Failed to resolve path '/home/fusion809/GitHub/mine/websites/fusion809.github.io/devmanual.gentoo.org': No such file or directory()
Error refreshing repository status:
Error: Failed to resolve path '/home/fusion809/GitHub/mine/websites/fusion809.github.io/galleria': No such file or directory()
Cannot read property 'bind' of null TypeError: Cannot read property 'bind' of null
    at process.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:82:23)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at handleMessage (internal/child_process.js:718:10)
    at Pipe.channel.onread (internal/child_process.js:444:11)
Cannot read property 'bind' of null TypeError: Cannot read property 'bind' of null
    at process.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:82:23)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at handleMessage (internal/child_process.js:718:10)
    at Pipe.channel.onread (internal/child_process.js:444:11)
Error refreshing repository status:
Error: Failed to resolve path '/home/fusion809/GitHub/mine/websites/fusion809.github.io/devmanual.gentoo.org': No such file or directory()
Error refreshing repository status:
Error: Failed to resolve path '/home/fusion809/GitHub/mine/websites/fusion809.github.io/galleria': No such file or directory()
Cannot read property 'bind' of null TypeError: Cannot read property 'bind' of null
    at process.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:82:23)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at handleMessage (internal/child_process.js:718:10)
    at Pipe.channel.onread (internal/child_process.js:444:11)

@ivankravets
Copy link

@fusion809

  1. What is the version of platformio-ide-terminal? Please install the latest version.
  2. Did you set default shell? http://www.cyberciti.biz/faq/howto-change-linux-unix-freebsd-login-shell/

@fusion809
Copy link
Author

Answers:

  1. 2.0.10 I always use the latest of my packages, as soon as I get a notification that I'm using an outdated version of some of my packages I run apm update.
  2. Yes using chsh -s /bin/zsh. Set for both root and my user account.

@ivankravets
Copy link

I see the screenshot that you have attached above and it's very old terminal (the buttons are not located in the status bar).

Please go to ~/.atom/packages and remove all -*terminal* packages. Then, install clean version of platformio-ide-terminal.

@fusion809
Copy link
Author

fusion809 commented Jun 6, 2016

That screenshot was with terminal-plus, I have tried with platformio-ide-terminal too (got the same result though), after removing terminal-plus, of course, but I didn't show a screenshot of it. Here is platformio-ide-terminal's screenshot:

@ivankravets
Copy link

Thanks! Could you share an output from the dev console? View > Developer > Reload

@fusion809
Copy link
Author

Window load time: 392ms
::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
Uncaught (in promise) TypeError: Cannot read property 'red' of undefined()
Cannot find module '../build/Release/pty.node'
Cannot find module '../bin/linux/x64.m48.node' module.js:440
    throw err;
    ^
Error: Cannot find module '../bin/linux/x64.m48.node'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.Module._load (module.js:386:25)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js/lib/pty.js:18:9)
    at Module._compile (module.js:541:32)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js/index.js:2:18)
    at Module._compile (module.js:541:32)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/lib/process.coffee:1:7)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/lib/process.coffee:1:1)
    at Module._compile (module.js:541:32)
    at Object.value [as .coffee] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:110:13)
Cannot read property 'bind' of null TypeError: Cannot read property 'bind' of null
    at process.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:82:23)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at handleMessage (internal/child_process.js:718:10)
    at Pipe.channel.onread (internal/child_process.js:444:11)
Cannot find module '../build/Release/pty.node'
Cannot find module '../bin/linux/x64.m48.node' module.js:440
    throw err;
    ^
Error: Cannot find module '../bin/linux/x64.m48.node'
    at Function.Module._resolveFilename (module.js:438:15)
    at Function.Module._load (module.js:386:25)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js/lib/pty.js:18:9)
    at Module._compile (module.js:541:32)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js/index.js:2:18)
    at Module._compile (module.js:541:32)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/lib/process.coffee:1:7)
    at Object.<anonymous> (/home/fusion809/.atom/packages/platformio-ide-terminal/lib/process.coffee:1:1)
    at Module._compile (module.js:541:32)
    at Object.value [as .coffee] (/usr/lib/atom/src/compile-cache.js:208:21)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:110:13)
Cannot read property 'bind' of null TypeError: Cannot read property 'bind' of null
    at process.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:82:23)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at handleMessage (internal/child_process.js:718:10)
    at Pipe.channel.onread (internal/child_process.js:444:11)
Cannot read property 'bind' of null TypeError: Cannot read property 'bind' of null
    at process.<anonymous> (/usr/lib/atom/src/task-bootstrap.js:82:23)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)
    at handleMessage (internal/child_process.js:718:10)
    at Pipe.channel.onread (internal/child_process.js:444:11)

@ivankravets
Copy link

  1. Install gcc compiler
  2. cd ~/.atom/packages/platformio-ide-terminal/node_modules/pty.js
  3. npm install
  4. Check that build/Release/pty.node exists
  5. Restart Atom.

@tensor5
Copy link
Owner

tensor5 commented Jun 6, 2016

@fusion809 thanks for reporting the issue.

I tried terminal-plus right now and I get the exact same problem. I'm looking into it.

@fusion809
Copy link
Author

fusion809 commented Jun 6, 2016

@ivankravets Just did and build/Release/pty.node does not exist. npm install gave the error:

npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

> pty.js@0.3.0 install /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js
> node scripts/install.js

{ Error: Command failed: node-gyp rebuild
In file included from ../src/unix/pty.cc:20:0:
../node_modules/nan/nan.h:592:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:592:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback
       ^~
../node_modules/nan/nan.h:593:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^~~~~~~~~~~~~~
../node_modules/nan/nan.h:598:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
       v8::Isolate::GCEpilogueCallback callback) {
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:598:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCEpilogueCallback callback) {
       ^~
../node_modules/nan/nan.h:603:20: error: variable or field ‘AddGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:603:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback
       ^~
../node_modules/nan/nan.h:604:18: error: expected primary-expression before ‘gc_type_filter’
     , v8::GCType gc_type_filter = v8::kGCTypeAll) {
                  ^~~~~~~~~~~~~~
../node_modules/nan/nan.h:609:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
       v8::Isolate::GCPrologueCallback callback) {
                    ^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:609:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
       v8::Isolate::GCPrologueCallback callback) {
       ^~
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.5.6-1-ck
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js
gyp ERR! node -v v6.2.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 

    at ChildProcess.exithandler (child_process.js:207:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) killed: false, code: 1, signal: null, cmd: 'node-gyp rebuild' }
make: Entering directory '/home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
pty.target.mk:88: recipe for target 'Release/obj.target/pty/src/unix/pty.o' failed
make: Leaving directory '/home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js/build'


> pty.js@0.3.0 postinstall /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js
> node scripts/post-install.js

pty.js@0.3.0 /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js
└─┬ mocha@1.17.1 
  ├── commander@2.0.0 
  ├─┬ debug@2.2.0 
  │ └── ms@0.7.1 
  ├── diff@1.0.7 
  ├─┬ glob@3.2.3 
  │ ├── graceful-fs@2.0.3 
  │ ├── inherits@2.0.1 
  │ └─┬ minimatch@0.2.14 
  │   ├── lru-cache@2.7.3 
  │   └── sigmund@1.0.1 
  ├── growl@1.7.0 
  ├─┬ jade@0.26.3 
  │ ├── commander@0.6.1 
  │ └── mkdirp@0.3.0 
  └── mkdirp@0.3.5 

@tensor5
Copy link
Owner

tensor5 commented Jun 6, 2016

It must be related to the fact that we use electron 1.2.1, so the headers are different.

@ivankravets
Copy link

  1. Different headers
  2. Different npm

Where is located npm in Atom/Linux Arh? My Mac: /Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm. Try to rebuilt gyp module using Atom's npm. I mean, in 3-rd step from my guide please use Atom's npm. In my case, it would be:

cd ~/.atom/packages/platformio-ide-terminal/node_modules/pty.js
/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm install

@fusion809
Copy link
Author

@tensor5 YW. I must admit I am a fan of this build of yours. Btw if you use Atom to edit your PKGBUILDs you may wish to install a package of mine language-archlinux and its dependency language-unix-shell, although it conflicts with the core package language-shellscript so you'll have to disable it in your config.cson. It allows you to run updpkgsums, namcap and mksrcinfo. It gives this syntax-highlighting of a simpler atom-editor PKGBUILD of mine.

@fusion809
Copy link
Author

@ivankravets Ah I don't even know where this package keeps its npm. @tensor5? Guessing you'd know.

@tensor5
Copy link
Owner

tensor5 commented Jun 6, 2016

npm is system /usr/bin/npm
apm uses its own npm in /usr/lib/node_modules/atom-package-manager/node_modules/npm

@fusion809
Copy link
Author

Ah /usr/lib/node_modules/atom-package-manager/node_modules/npm install returns zsh: permission denied: /usr/lib/node_modules/atom-package-manager/node_modules/npm. I tried running sudo chmod +x /usr/lib/node_modules/atom-package-manager/node_modules/npm but it made no difference.

@tensor5
Copy link
Owner

tensor5 commented Jun 6, 2016

Sorry, I meant /usr/lib/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js

@fusion809
Copy link
Author

fusion809 commented Jun 6, 2016

/usr/lib/node_modules/atom-package-manager/node_modules/npm/bin/npm-cli.js install returned:

(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17140) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

> pty.js@0.3.0 install /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js
> node scripts/install.js

{ Error: Command failed: node-gyp rebuild
(node:17179) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:17179) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
gyp: /home/fusion809/.node-gyp/6.2.1/common.gypi not found (cwd: /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/lib/configure.js:357:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.5.6-1-ck
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/atom-package-manager/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js
gyp ERR! node -v v6.2.1
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 

    at ChildProcess.exithandler (child_process.js:207:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) killed: false, code: 1, signal: null, cmd: 'node-gyp rebuild' }


> pty.js@0.3.0 postinstall /home/fusion809/.atom/packages/platformio-ide-terminal/node_modules/pty.js
> node scripts/post-install.js

extend@1.2.1 node_modules/extend

nan@2.0.5 node_modules/nan

mocha@1.17.1 node_modules/mocha
├── commander@2.0.0
├── diff@1.0.7
├── growl@1.7.0
├── mkdirp@0.3.5
├── debug@2.2.0 (ms@0.7.1)
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
└── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)

@tensor5
Copy link
Owner

tensor5 commented Jun 6, 2016

It works if you upgrade nan to the latest version:

cd $HOME/.atom/packages/terminal-plus/node_modules/pty.js

in package.json change "nan": "2.0.5" into "nan": "2.3.5" and then run npm install.

We are compiling against the node headers here not electron, but it works for now. Meantime I'll think of a better solution.

@fusion809
Copy link
Author

fusion809 commented Jun 6, 2016

Aha! It works for me to. @ivankravets Is there any way of fixing this problem by modifying platformio-ide-terminal's package.json? Or maybe fork the chjj/pty.js repo and adjust its nan version?

@fusion809
Copy link
Author

fusion809 commented Jun 6, 2016

I just forked chjj/pty.js myself, and made the necessary changes and published a 0.3.1 release. So replace the pty.js dependency to (in accordance to http://stackoverflow.com/a/29595538/1876983):

"dependencies": [
   "pty.js": "fusion809/pty.js#v0.3.1"
]

@tensor5
Copy link
Owner

tensor5 commented Jun 6, 2016

In fact, it's safer to run apm install rather than npm install in $HOME/.atom/packages/terminal-plus/node_modules/pty.js. This way, it will compile against Electron's headers.

@ivankravets
Copy link

  1. This solution will work only for the people that have C/C++ compiler installed.2
  2. In platformio-ide-terminal we have pre-built pty's backends for the most popular OS/Archs.
  3. The 2 bridges Win/Unix uses 2.0.5 NAN and obsolete WinPty (2013) year.

The original author doesn't support this package. This PR platformio/platformio-atom-ide-terminal#39 will not work at all.

Let's move discussion to platformio/platformio-atom-ide-terminal#39

I'll try to port existing code to the latest NAN and WinPty and prepare a few "after-gyp"s for the popular OS and will ask you to try it

@fusion809
Copy link
Author

fusion809 commented Jul 1, 2016

@ivankravets @tensor5 This issue does not seem to be resolved, with platformio-ide-terminal 2.0.10 (don't worry, I'm not confusing the platformio-ide-terminal package with my fork — I removed my fork and used the platformio-ide-terminal package and found this error) and the latest build of Atom from this repo the terminal provided by this package doesn't load at all.

screenshot from 2016-07-02 05-56-34

I had to rebuild this package's modules when using this build of Atom, but I successfully rebuilt them and now this package won't load. Could this be related to this package using Electron 1.2.5 and GTK+3 instead of the default GTK+2?

@fusion809
Copy link
Author

fusion809 commented Jul 1, 2016

Here is the Chrome dev tools log when using the default build of Atom (http://paste2.org/x57Cb5JH) with platformio-ide-terminal opened, using that build this package works fine. While with this repo's build of Atom I get this log (URL: http://paste2.org/dpA0aPtM).

@fusion809
Copy link
Author

Oops, I suppose this isn't new, sorry guys for pingin' yas. It isn't new as platformio-ide-terminal still uses the old pty.js. Using the new version of pty.js fixes it.

@fusion809
Copy link
Author

I just applied this fix to my terminal-fusion fork (commit a962490).

@tensor5
Copy link
Owner

tensor5 commented Jul 2, 2016

The problem is still with the obsolete nan package in pty.js.

@stleon
Copy link

stleon commented Sep 26, 2016

the same problem =(

@fusion809
Copy link
Author

fusion809 commented Sep 26, 2016

@stleon use my fork of the platformio-ide-terminal package then, terminal-fusion. It has the solution to this problem applied. If you like the package feel free to star it with APM and/or on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants