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

trailpack-repl: No text terminal available if using nodemon #42

Open
jaykilleen opened this issue Oct 26, 2017 · 3 comments
Open

trailpack-repl: No text terminal available if using nodemon #42

jaykilleen opened this issue Oct 26, 2017 · 3 comments

Comments

@jaykilleen
Copy link

jaykilleen commented Oct 26, 2017

I have followed the steps in the readme and added a config/repl.js and set allowNoTTY to true. I still see the error info: trailpack-repl: No text terminal available. when running npm start. This is a fresh install of trails.js on a Windows 10 machine running Git Bash.

// config/repl.js
module.exports = {
  /**
   * REPL is disabled automatically if no text terminal is available. Set
   * to "true" to override this behavior.
   */
  allowNoTTY: true
}

I understand if the fix is, use a VM running Ubuntu instead of native windows but thought this might be an issue you might need to fix.

BTW so glad to give this project a spin after hearing it on JSJ :)

@jaykilleen
Copy link
Author

I believe this is working now and the issue was caused by invoking the server.sj using nodemon. I wanted changes to my files to autorestart the server so set npm start to nodemon server.js. Seems this means I don't get the repl functionality.

@jaykilleen jaykilleen changed the title Windows 10 using Git Bash: trailpack-repl: No text terminal available trailpack-repl: No text terminal available if using nodemon Oct 30, 2017
@jaykilleen
Copy link
Author

Also I had not added exports.repl = require('./repl') to config/index.js.

Have added this. The error output on npm start is still

[nodemon] 1.12.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
info: trailpack-repl: No text terminal available.
warn: trailpack-repl: allowNoTTY is enabled, Launching REPL anyway.
info: config.paths.www: No www directory is set, www middleware will not be loaded
info: config.session.secret: No secret given so session are disabled
info: All trailpacks are loaded.

but still don't see the > Trails also can no longer ctrl+c to kill the terminal.

@jaykilleen
Copy link
Author

Ignore the error re: no ctrl+c this seems to have been introduced with the node 8 LTS release and Windows.

microsoft/node-pty#7
PowerShell/Win32-OpenSSH#914

FYI Closing the terminal then causes a config.session.secret: No secret given so session are disabled error when restarting the application. Need to hunt down the pids and kill them manually I suppose.

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

1 participant