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

"npm start" tries to execute "palemoon" throwing an error #9225

Closed
leonardopaffi opened this issue Jun 26, 2020 · 13 comments
Closed

"npm start" tries to execute "palemoon" throwing an error #9225

leonardopaffi opened this issue Jun 26, 2020 · 13 comments

Comments

@leonardopaffi
Copy link

Describe the bug

npm start tries to open palemoon by default on Linux, even if it's not installed.

Starting the development server...

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/bin/palemoon ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /usr/bin/palemoon',
  path: '/usr/bin/palemoon',
  spawnargs: [ 'http://localhost:3000/' ]
}

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

Nothing found in /docs/troubleshooting

Environment

  current version of create-react-app: 3.4.1
  running from /home/myself/.npm/_npx/5604/lib/node_modules/create-react-app

  System:
    OS: Linux 5.4 Manjaro Linux
    CPU: (4) x64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
  Binaries:
    Node: 14.3.0 - /usr/bin/node
    Yarn: Not Found
    npm: 6.14.5 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 77.0.1
  npmPackages:
    react: ^16.13.1 => 16.13.1 
    react-dom: ^16.13.1 => 16.13.1 
    react-scripts: 3.4.1 => 3.4.1 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. npx create-react-app my-app
  2. cd my-app
  3. npm start
  4. error

Expected behavior

Running the app in dev mode inside Firefox connecting to http://localhost:3000/

Actual behavior

2020-06-26-110626_3286x1080_scrot

Reproducible demo

TicTacToe tutorial

@ShahrozTanveer
Copy link

hi @leonardopaffi
try npm cache clean --force
then delete your node_modules dir and package-lock.json file.
=> run npm install
then run npm start

@rjramesh
Copy link

first error missing script : start

@leonardopaffi
Copy link
Author

hi @ShahrozTanveer
I get the same error as before:

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/bin/palemoon ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /usr/bin/palemoon',
  path: '/usr/bin/palemoon',
  spawnargs: [ 'http://localhost:3000/' ]
}```

@ShahrozTanveer
Copy link

hi @ShahrozTanveer
I get the same error as before:

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/bin/palemoon ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
    at onErrorNT (internal/child_process.js:468:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /usr/bin/palemoon',
  path: '/usr/bin/palemoon',
  spawnargs: [ 'http://localhost:3000/' ]
}```

@leonardopaffi please provide debug logs

@eddiemonge
Copy link
Contributor

Is palemoon listed as your default browser? What happens if you do which palemoon?

@leonardopaffi
Copy link
Author

@eddiemonge
I don't have palemoon installed, therefore which palemoon returns palemoon not found.

@ShahrozTanveer

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@6.14.5
3 info using node@v14.3.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle tutorial_tictactoe@0.1.0~prestart: tutorial_tictactoe@0.1.0
6 info lifecycle tutorial_tictactoe@0.1.0~start: tutorial_tictactoe@0.1.0
7 verbose lifecycle tutorial_tictactoe@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle tutorial_tictactoe@0.1.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/myname/Documents/projects/tutorial_tictactoe/node_modules/.bin:/home/myname/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
9 verbose lifecycle tutorial_tictactoe@0.1.0~start: CWD: /home/myname/Documents/projects/tutorial_tictactoe
10 silly lifecycle tutorial_tictactoe@0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle tutorial_tictactoe@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle tutorial_tictactoe@0.1.0~start: Failed to exec start script
13 verbose stack Error: tutorial_tictactoe@0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1051:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid tutorial_tictactoe@0.1.0
15 verbose cwd /home/myname/Documents/projects/tutorial_tictactoe
16 verbose Linux 5.4.44-1-MANJARO
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v14.3.0
19 verbose npm  v6.14.5
20 error code ELIFECYCLE
21 error errno 1
22 error tutorial_tictactoe@0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the tutorial_tictactoe@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@stale
Copy link

stale bot commented Aug 1, 2020

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Aug 1, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Aug 8, 2020
@hieulw
Copy link

hieulw commented Oct 26, 2020

I encounter the same issue but with /usr/bin/firefox. After a while, I figure out that change the $BROWSER should fix the error. Give the path to your own browser. I use brave for example

export BROWSER=/usr/bin/brave
npm start

@king-11
Copy link

king-11 commented Nov 13, 2020

@hieulw you are a life saver thanks a lot

@SergeyArenzon
Copy link

I encounter the same issues but with /usr/bin/firefox. After a while, I figure out that change the $BROWSER should fixed the error. Give the path to your own browser. I use brave for example

export BROWSER=/usr/bin/brave
npm start

Same was in my manjaro os with firefox, fixed it by export BROWSER=/usr/bin/firefox-developer-edition

@ChARCOOL
Copy link

It didn't happened to me before even after uninstalling Firefox, but It randomly just appeared in my console after trying to run start with yarn. I am currently using Microsoft Edge and I tried @hieulw method, and it worked pretty well. Thank you!

@hudsonbay
Copy link

I encounter the same issues but with /usr/bin/firefox. After a while, I figure out that change the $BROWSER should fixed the error. Give the path to your own browser. I use brave for example

export BROWSER=/usr/bin/brave
npm start

Same was in my manjaro os with firefox, fixed it by export BROWSER=/usr/bin/firefox-developer-edition

Exactly, that's because Manjaro comes pre-installed with Firefox by default and as default browser

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

No branches or pull requests

9 participants