Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
35
rated 0 times [  38] [ 3]  / answers: 1 / hits: 17900  / 5 Years ago, fri, april 19, 2019, 12:00:00

I'm trying to deploy a ReactJS app in my Ubuntu 16.04 server but when I execute the command:



serve -s build



This is my package.json file:



{
name: client,
version: 0.1.0,
private: true,
dependencies: {
bootstrap: ^4.3.1,
history: ^4.9.0,
jquery: ^3.4.0,
moment: ^2.24.0,
popper.js: ^1.15.0,
react: ^16.8.6,
react-dom: ^16.8.6,
react-router-dom: ^5.0.0,
react-scripts: 2.1.8
},
scripts: {
start: react-scripts start,
build: react-scripts build,
test: react-scripts test,
eject: react-scripts eject
},
eslintConfig: {
extends: react-app
},
browserslist: [
>0.2%,
not dead,
not ie <= 11,
not op_mini all
]
}


I get this error:



ERROR: Cannot copy to clipboard: Command failed: xsel --clipboard --input
xsel: Can't open display: (null)
: Inappropriate ioctl for device

┌──────────────────────────────────────────────────┐
│ │
│ Serving! │
│ │
│ - Local: http://localhost:5000 │
│ - On Your Network: http://server_IP:5000 │
│ │
└──────────────────────────────────────────────────┘


But the app is not loaded and is not accessible at the port 5000.



How can I figured out this?


More From » node.js

 Answers
6

I had the same issue and I solved it by adding -n option to serve.



-n, --no-clipboard Do not copy the local address to the clipboard


[#52221] Friday, April 12, 2019, 5 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
stefanicarolinat

Total Points: 145
Total Questions: 91
Total Answers: 93

Location: Cambodia
Member since Thu, Oct 7, 2021
3 Years ago
stefanicarolinat questions
Mon, Nov 15, 21, 00:00, 3 Years ago
Fri, Apr 16, 21, 00:00, 3 Years ago
Thu, Oct 15, 20, 00:00, 4 Years ago
Fri, Jul 17, 20, 00:00, 4 Years ago
;