ReactJS部署应用程序错误无法复制到剪贴板:命令失败:xsel --clipboard --input [英] ReactJS deploy app error Cannot copy to clipboard: Command failed: xsel --clipboard --input
本文介绍了ReactJS部署应用程序错误无法复制到剪贴板:命令失败:xsel --clipboard --input的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我的 Ubuntu 16.04 服务器中部署 ReactJS 应用,但是当我执行命令时:
I'm trying to deploy a ReactJS app in my Ubuntu 16.04 server but when I execute the command:
为-s build
这是我的 package.json
文件:
{
"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"
]
}
我收到此错误:
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 │
│ │
└──────────────────────────────────────────────────┘
但是该应用程序尚未加载,并且无法在端口 5000
上访问.
But the app is not loaded and is not accessible at the port 5000
.
我怎么知道呢?
推荐答案
我遇到了同样的问题,我通过添加"-n"选项来解决该问题.
I had the same issue and I solved it by adding "-n" option to serve.
-n,--no-clipboard不要将本地地址复制到剪贴板中"
"-n, --no-clipboard Do not copy the local address to the clipboard"
这篇关于ReactJS部署应用程序错误无法复制到剪贴板:命令失败:xsel --clipboard --input的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文