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

ndb closes instantly after launch (Ubuntu) #336

Closed
j-koziel opened this issue May 22, 2022 · 5 comments
Closed

ndb closes instantly after launch (Ubuntu) #336

j-koziel opened this issue May 22, 2022 · 5 comments

Comments

@j-koziel
Copy link

j-koziel commented May 22, 2022

I've installed it locally, globally and as a dev dependency but to no avail.

Tell us about your environment:

  • ndb version: 1.1.5
  • Platform / OS version: Ubuntu 22.04 Jammy Jellyfish, window manager: bspwm, compositor: picom
  • Node.js version: 16.15.0

What steps will reproduce the problem?

package.json file
{ "name": "natours", "version": "1.0.0", "description": "Learning node, express and mongoDB", "main": "app.js", "scripts": { "start": "nodemon server.js", "start:prod": "NODE_ENV=production nodemon server.js", "debug": "ndb server.js" }, "author": "Jonathan Koziel", "license": "ISC", "dependencies": { "dotenv": "^16.0.0", "express": "^4.17.3", "mongoose": "^5.13.14", "morgan": "^1.10.0", "slugify": "^1.6.5", "validator": "^13.7.0" }, "devDependencies": { "eslint": "^8.13.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-react": "^7.29.4", "ndb": "^1.1.5", "prettier": "^2.6.2", "puppeteer-core": "^14.1.1" }, "engines": { "node": ">=10.0.0" } }

What is the expected result?
ndb should open and work

What happens instead?
ndb opens a window and disappears immediately after.
Video:

simplescreenrecorder-2022-05-22_09.36.32.mp4

When I use sudo no window opens but instead i get an error mentioned in a previous issue.
Error log:
sudo ndb server.js
events.js:291
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at Pipe.onStreamRead (internal/stream_base_commons.js:209:20)
Emitted 'error' event on Socket instance at:
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNRESET',
code: 'ECONNRESET',
syscall: 'read'
}

@davidsu
Copy link

davidsu commented Jul 11, 2022

+1

@AmritPant
Copy link

AmritPant commented Jul 19, 2022

Hey,
I am also in Jonas's course, I also had a similar issue to fix this issue

It Is because Chrome cannot be run as root by default.
A workaround is to install ndb in a directory that doesn't require elevated permissions.

npm uninstall --location=global ndb // UNINSTALL IT

npm install --location=global --prefix=$HOME/.npm ndb // INSTALL IT ON SEPRATE DIRECTORY

vim ~/.bashrc // OPEN .bashrc file in any code editor .. ONLY if you are using bash or ZSH if you are using FISH then ~/.config/fish/config.fish

PATH=$PATH:"$HOME/.npm/bin". // Add the PATH VARIABLE TO .bashrc FILE

@j-koziel
Copy link
Author

I tried doing that after I saw this comment on another issue (#312) but it did not work for me either.

I think i am just going to close this issue as I have made my return back to windows and it seems as if this package is no longer being maintained (#334)

@j-koziel
Copy link
Author

Thanks for the suggestion 👍

@AmritPant
Copy link

@j-koziel Welcome

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

No branches or pull requests

3 participants