- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
几个月都工作良好,两天前退出工作。不要忘记更改.yamls
中的任何内容。
基本上,当我启动create-react-app
时,create-react-app
客户端只是启动,失败并重新启动。
我试过了:
skaffold
minikube
kubectl
skaffold
和
create-react-app
似乎是一个问题,因为以下情况仍然可以正常使用:
api
和postgres
pods 仍然可以启动并运行得很好create-react-app
问题:cd client
npm install
npm start
docker
问题:cd client
docker build -f Dockerfile.dev .
docker run -it -p 3000:3000 <image_id>
# client.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: client-deployment-dev
spec:
replicas: 1
selector:
matchLabels:
component: client
template:
metadata:
labels:
component: client
spec:
containers:
- name: client
image: client
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: client-cluster-ip-service-dev
spec:
type: ClusterIP
selector:
component: client
ports:
- port: 3000
targetPort: 3000
#skaffold.yaml
apiVersion: skaffold/v1beta15
kind: Config
build:
local:
push: false
artifacts:
- image: client
context: client
docker:
dockerfile: Dockerfile.dev
sync:
manual:
- src: "***/*.js"
dest: .
- src: "***/*.jsx"
dest: .
- src: "***/*.json"
dest: .
- src: "***/*.html"
dest: .
- src: "***/*.css"
dest: .
- src: "***/*.scss"
dest: .
deploy:
kubectl:
manifests:
- manifests/dev/client.yaml
# Dockerfile.dev
FROM node:13-alpine
WORKDIR /app
COPY ./package.json ./
RUN npm install
COPY . .
CMD ["npm", "start"]
-v DEBUG
日志:
$ skaffold dev -v DEBUG
INFO[0000] starting gRPC server on port 50051
INFO[0000] starting gRPC HTTP server on port 50052
INFO[0000] Skaffold &{Version:v1.6.0-docs ConfigVersion:skaffold/v2beta1 GitVersion: GitCommit:b74e2f94f628b16a866abddc2ba8f05ce0bf956c GitTreeState:clean BuildDate:2020-03-25T00:09:12Z GoVersion:go1.14 Compiler:gc Platform:linux/amd64}
DEBU[0000] config version (skaffold/v1beta15) out of date: upgrading to latest (skaffold/v2beta1)
DEBU[0000] validating yamltags of struct SkaffoldConfig
DEBU[0000] validating yamltags of struct Metadata
DEBU[0000] validating yamltags of struct Pipeline
DEBU[0000] validating yamltags of struct BuildConfig
DEBU[0000] validating yamltags of struct Artifact
DEBU[0000] validating yamltags of struct Sync
DEBU[0000] validating yamltags of struct SyncRule
DEBU[0000] validating yamltags of struct SyncRule
DEBU[0000] validating yamltags of struct SyncRule
DEBU[0000] validating yamltags of struct SyncRule
DEBU[0000] validating yamltags of struct SyncRule
DEBU[0000] validating yamltags of struct SyncRule
DEBU[0000] validating yamltags of struct ArtifactType
DEBU[0000] validating yamltags of struct DockerArtifact
DEBU[0000] validating yamltags of struct TagPolicy
DEBU[0000] validating yamltags of struct GitTagger
DEBU[0000] validating yamltags of struct BuildType
DEBU[0000] validating yamltags of struct LocalBuild
DEBU[0000] validating yamltags of struct DeployConfig
DEBU[0000] validating yamltags of struct DeployType
DEBU[0000] validating yamltags of struct KubectlDeploy
DEBU[0000] validating yamltags of struct KubectlFlags
INFO[0000] Using kubectl context: minikube
DEBU[0000] Using builder: local
DEBU[0000] Running command: [minikube docker-env --shell none]
DEBU[0000] Command output: [DOCKER_TLS_VERIFY=1
DOCKER_HOST=tcp://192.168.39.184:2376
DOCKER_CERT_PATH=/home/eoxdev/.minikube/certs
MINIKUBE_ACTIVE_DOCKERD=minikube
]
DEBU[0000] setting Docker user agent to skaffold-v1.6.0-docs
Listing files to watch...
- client
DEBU[0000] Found dependencies for dockerfile: [{package.json /app true} {. /app true}]
DEBU[0000] Skipping excluded path: node_modules
INFO[0000] List generated in 1.684217ms
Generating tags...
- client -> DEBU[0000] Running command: [git describe --tags --always]
DEBU[0000] Command output: [3403aa6
]
DEBU[0000] Running command: [git status . --porcelain]
DEBU[0000] Command output: []
client:3403aa6
INFO[0000] Tags generated in 3.085635ms
Checking cache...
DEBU[0000] Found dependencies for dockerfile: [{package.json /app true} {. /app true}]
DEBU[0000] Skipping excluded path: node_modules
- client: Found Locally
INFO[0000] Cache check complete in 6.098469ms
Tags used in deployment:
- client -> client:1319b715976becb303bd077717e754e52beaef72d44c7b09f5b6835b1afacae2
local images can't be referenced by digest. They are tagged and referenced by a unique ID instead
Starting deploy...
DEBU[0000] Running command: [kubectl version --client -ojson]
DEBU[0000] Command output: [{
"clientVersion": {
"major": "1",
"minor": "18",
"gitVersion": "v1.18.0",
"gitCommit": "9e991415386e4cf155a24b1da15becaa390438d8",
"gitTreeState": "clean",
"buildDate": "2020-03-25T14:58:59Z",
"goVersion": "go1.13.8",
"compiler": "gc",
"platform": "linux/amd64"
}
}
]
DEBU[0000] Running command: [kubectl --context minikube create --dry-run -oyaml -f /home/eoxdev/Projects/issues/skaffold-cra-error/manifests/dev/client.yaml]
DEBU[0000] Command output: [apiVersion: apps/v1
kind: Deployment
metadata:
name: client-deployment-dev
namespace: default
spec:
replicas: 1
selector:
matchLabels:
component: client
template:
metadata:
labels:
component: client
spec:
containers:
- image: client
name: client
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: client-cluster-ip-service-dev
namespace: default
spec:
ports:
- port: 3000
targetPort: 3000
selector:
component: client
type: ClusterIP
], stderr: W0327 08:49:50.543847 16516 helpers.go:535] --dry-run is deprecated and can be replaced with --dry-run=client.
DEBU[0000] manifests with tagged images: apiVersion: apps/v1
kind: Deployment
metadata:
name: client-deployment-dev
namespace: default
spec:
replicas: 1
selector:
matchLabels:
component: client
template:
metadata:
labels:
component: client
spec:
containers:
- image: client:1319b715976becb303bd077717e754e52beaef72d44c7b09f5b6835b1afacae2
name: client
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: client-cluster-ip-service-dev
namespace: default
spec:
ports:
- port: 3000
targetPort: 3000
selector:
component: client
type: ClusterIP
DEBU[0000] manifests with labels apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/managed-by: skaffold-v1.6.0-docs
skaffold.dev/builder: local
skaffold.dev/cleanup: "true"
skaffold.dev/deployer: kubectl
skaffold.dev/docker-api-version: "1.40"
skaffold.dev/run-id: 2ee04f07-3f07-4e75-bdba-dfac76d18bf0
skaffold.dev/tag-policy: git-commit
skaffold.dev/tail: "true"
name: client-deployment-dev
namespace: default
spec:
replicas: 1
selector:
matchLabels:
component: client
template:
metadata:
labels:
app.kubernetes.io/managed-by: skaffold-v1.6.0-docs
component: client
skaffold.dev/builder: local
skaffold.dev/cleanup: "true"
skaffold.dev/deployer: kubectl
skaffold.dev/docker-api-version: "1.40"
skaffold.dev/run-id: 2ee04f07-3f07-4e75-bdba-dfac76d18bf0
skaffold.dev/tag-policy: git-commit
skaffold.dev/tail: "true"
spec:
containers:
- image: client:1319b715976becb303bd077717e754e52beaef72d44c7b09f5b6835b1afacae2
name: client
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/managed-by: skaffold-v1.6.0-docs
skaffold.dev/builder: local
skaffold.dev/cleanup: "true"
skaffold.dev/deployer: kubectl
skaffold.dev/docker-api-version: "1.40"
skaffold.dev/run-id: 2ee04f07-3f07-4e75-bdba-dfac76d18bf0
skaffold.dev/tag-policy: git-commit
skaffold.dev/tail: "true"
name: client-cluster-ip-service-dev
namespace: default
spec:
ports:
- port: 3000
targetPort: 3000
selector:
component: client
type: ClusterIP
DEBU[0000] 2 manifests to deploy. 2 are updated or new
DEBU[0000] Running command: [kubectl --context minikube apply -f - --force --grace-period=0]
- deployment.apps/client-deployment-dev created
- service/client-cluster-ip-service-dev created
INFO[0000] Deploy complete in 391.276171ms
Waiting for deployments to stabilize
DEBU[0000] getting client config for kubeContext: ``
DEBU[0000] checking status default:deployment/client-deployment-dev
DEBU[0000] Running command: [kubectl --context minikube rollout status deployment client-deployment-dev --namespace default --watch=false]
DEBU[0000] Command output: [Waiting for deployment "client-deployment-dev" rollout to finish: 0 of 1 updated replicas are available...
]
DEBU[0001] Running command: [kubectl --context minikube rollout status deployment client-deployment-dev --namespace default --watch=false]
- default:deployment/client-deployment-dev Waiting for deployment "client-deployment-dev" rollout to finish: 0 of 1 updated replicas are available...
DEBU[0001] Command output: [Waiting for deployment "client-deployment-dev" rollout to finish: 0 of 1 updated replicas are available...
]
DEBU[0001] Running command: [kubectl --context minikube rollout status deployment client-deployment-dev --namespace default --watch=false]
DEBU[0001] Command output: [Waiting for deployment "client-deployment-dev" rollout to finish: 0 of 1 updated replicas are available...
]
DEBU[0001] Running command: [kubectl --context minikube rollout status deployment client-deployment-dev --namespace default --watch=false]
DEBU[0001] Command output: [Waiting for deployment "client-deployment-dev" rollout to finish: 0 of 1 updated replicas are available...
]
DEBU[0001] Running command: [kubectl --context minikube rollout status deployment client-deployment-dev --namespace default --watch=false]
DEBU[0001] Command output: [Waiting for deployment "client-deployment-dev" rollout to finish: 0 of 1 updated replicas are available...
]
DEBU[0002] Running command: [kubectl --context minikube rollout status deployment client-deployment-dev --namespace default --watch=false]
DEBU[0002] Command output: [Waiting for deployment "client-deployment-dev" rollout to finish: 0 of 1 updated replicas are available...
]
DEBU[0002] Running command: [kubectl --context minikube rollout status deployment client-deployment-dev --namespace default --watch=false]
DEBU[0002] Command output: [deployment "client-deployment-dev" successfully rolled out
]
- default:deployment/client-deployment-dev is ready.
Deployments stabilized in 1.818029816s
DEBU[0002] getting client config for kubeContext: ``
INFO[0002] Streaming logs from pod: client-deployment-dev-58bdbf5664-fcc7k container: client
DEBU[0002] Running command: [kubectl --context minikube logs --since=3s -f client-deployment-dev-58bdbf5664-fcc7k -c client --namespace default]
[client-deployment-dev-58bdbf5664-fcc7k client]
[client-deployment-dev-58bdbf5664-fcc7k client] > client@0.1.0 start /app
[client-deployment-dev-58bdbf5664-fcc7k client] > react-scripts start
[client-deployment-dev-58bdbf5664-fcc7k client]
DEBU[0002] Found dependencies for dockerfile: [{package.json /app true} {. /app true}]
DEBU[0002] Change detected <nil>
DEBU[0002] Skipping excluded path: node_modules
Watching for changes...
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: Project is running at http://172.17.0.8/
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: webpack output is served from
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: Content not from webpack is served from /app/public
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: 404s will fallback to /
[client-deployment-dev-58bdbf5664-fcc7k client] Starting the development server...
[client-deployment-dev-58bdbf5664-fcc7k client]
DEBU[0003] Found dependencies for dockerfile: [{package.json /app true} {. /app true}]
DEBU[0003] Skipping excluded path: node_modules
INFO[0004] Streaming logs from pod: client-deployment-dev-58bdbf5664-fcc7k container: client
DEBU[0004] Running command: [kubectl --context minikube logs --since=4s -f client-deployment-dev-58bdbf5664-fcc7k -c client --namespace default]
[client-deployment-dev-58bdbf5664-fcc7k client]
[client-deployment-dev-58bdbf5664-fcc7k client] > client@0.1.0 start /app
[client-deployment-dev-58bdbf5664-fcc7k client] > react-scripts start
[client-deployment-dev-58bdbf5664-fcc7k client]
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: Project is running at http://172.17.0.8/
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: webpack output is served from
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: Content not from webpack is served from /app/public
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: 404s will fallback to /
[client-deployment-dev-58bdbf5664-fcc7k client] Starting the development server...
[client-deployment-dev-58bdbf5664-fcc7k client]
INFO[0019] Streaming logs from pod: client-deployment-dev-58bdbf5664-fcc7k container: client
DEBU[0019] Running command: [kubectl --context minikube logs --since=20s -f client-deployment-dev-58bdbf5664-fcc7k -c client --namespace default]
[client-deployment-dev-58bdbf5664-fcc7k client]
[client-deployment-dev-58bdbf5664-fcc7k client] > client@0.1.0 start /app
[client-deployment-dev-58bdbf5664-fcc7k client] > react-scripts start
[client-deployment-dev-58bdbf5664-fcc7k client]
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: Project is running at http://172.17.0.8/
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: webpack output is served from
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: Content not from webpack is served from /app/public
[client-deployment-dev-58bdbf5664-fcc7k client] ℹ 「wds」: 404s will fallback to /
[client-deployment-dev-58bdbf5664-fcc7k client] Starting the development server...
[client-deployment-dev-58bdbf5664-fcc7k client]
^CCleaning up...
DEBU[0021] Running command: [kubectl --context minikube create --dry-run -oyaml -f /home/eoxdev/Projects/issues/skaffold-cra-error/manifests/dev/client.yaml]
DEBU[0021] Command output: [apiVersion: apps/v1
kind: Deployment
metadata:
name: client-deployment-dev
namespace: default
spec:
replicas: 1
selector:
matchLabels:
component: client
template:
metadata:
labels:
component: client
spec:
containers:
- image: client
name: client
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: client-cluster-ip-service-dev
namespace: default
spec:
ports:
- port: 3000
targetPort: 3000
selector:
component: client
type: ClusterIP
], stderr: W0327 08:50:11.709935 16770 helpers.go:535] --dry-run is deprecated and can be replaced with --dry-run=client.
DEBU[0021] Running command: [kubectl --context minikube delete --ignore-not-found=true -f -]
- deployment.apps "client-deployment-dev" deleted
- service "client-cluster-ip-service-dev" deleted
INFO[0021] Cleanup complete in 187.851194ms
v1.6.0-docs
发行说明中阅读此内容时,我很希望:
Note: This release comes with a new config version
v2beta1
. To upgrade yourskaffold.yaml
, useskaffold fix
. If you choose not to upgrade,skaffold
will auto-upgrade as best as it can.
最佳答案
这是由于facebook/create-react-app(特别是#8739和#8688)发生了变化。您会注意到,如果在不分配TTY的情况下运行,则容器会立即从docker退出:
$ docker run --rm client; echo ">> $?"
> client@0.1.0 start /app
> react-scripts start
ℹ 「wds」: Project is running at http://172.17.0.4/
ℹ 「wds」: webpack output is served from
ℹ 「wds」: Content not from webpack is served from /app/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...
>> 0
CI=true
:
--- client/Dockerfile.dev
+++ client/Dockerfile.dev
@@ -1,6 +1,7 @@
FROM node:13-alpine
WORKDIR /app
COPY ./package.json ./
+ENV CI=true
RUN npm install
COPY . .
关于reactjs - 支架和create-react-app停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60889553/
如果我调用一个应用程序两次或多次,但只有一个实例应该运行(这是所需的),我就会遇到一个问题。 首先一些(可能必要的)背景信息: 使用 MAC OS X El Capitan (10.11.6) 我有一
覆盖文件。覆盖 Apps 脚本文件。 这是不是 创建一个新的 Apps 脚本文件的问题。那对我没有帮助。我需要更新 现有的 Apps 脚本文件。这个问题类似于创建一个新文件,但不是同一个问题。更新的语
我是 Apps 脚本的新手,正在尝试了解使用另一个帐户在一个帐户中运行/触发脚本的基础知识。需要注意的是:我想在访问脚本的用户而不是拥有脚本的用户的情况下运行脚本——以便将运行时间分配给访问的用户。
我是 Apps 脚本的新手,正在尝试了解使用另一个帐户在一个帐户中运行/触发脚本的基础知识。需要注意的是:我想在访问脚本的用户而不是拥有脚本的用户的情况下运行脚本——以便将运行时间分配给访问的用户。
我有一个安卓应用程序。我想为我的应用程序实现 App Indexing。 我已经点击了 Google 开发者链接 https://developers.google.com/app-indexing/
有什么区别: import App from '../components/App'; 和 var App = require('../components/App'); 两者都用于获取组件,但它没有
问题: 我有一个使用 requireJS 的简单演示应用程序。当require.min.js脚本加载时,它尝试加载入口点脚本。但是,问题是,而不是 localhost:8090/js/app.js它尝
我正在构建一个 React Native 应用程序,目前正在尝试通过 Firebase Auth 实现一个身份验证注册系统。我已经按照指南/网站上的文档来设置 Firebase 配置文件。我运行该应用
因此 app.yaml 文件的一部分如下所示(至少在 GAE 教程中): handlers: - url: /.* script: main.app 但是,我也看到它看起来像这样: handler
我是Android App开发的新手。当我尝试创建一个新项目Android Project时,弹出以下消息: Information:Gradle tasks [:app:generateDebugS
我正在编写一个应用程序脚本(用于处理电子邮件、任务和日历事件)并希望将其部署为网络应用程序。 该应用程序将在运行它的用户的上下文中运行。该应用程序将被超过 10k+ 的用户使用,甚至可能更多。 在将其
我需要实现一个用于登录网站的 Google Apps 脚本应用,然后如果该网站上的身份验证过程成功,用户应该会在 google 脚本边栏中收到一条消息。 例如:用户输入他的邮箱和密码,然后他点击登录按
我正在开发一个跨平台应用程序,它将在 Google Play 商店和 App Store 上发布。 Google Play 政策以及 App Store 政策规定,您不能使用其他支付系统购买将在应用程
我的 AppEngine 应用程序在我的台式机上的开发服务器上运行良好,但我无法在 Google 服务器上获取版本以关注我的源代码更新。 这是最有说服力的例证。我的 app.yaml 文件开始于: a
我像这样将所有内容重定向到我的 app.yaml 中的单个文件 - url: /.* script: frontcontroller.application 但我仍然必须使用 robots.txt
我想构建一个基于 App Engine 的网络应用程序,并使用 Google 帐户对用户进行身份验证。我需要来自多个域的用户可以登录。从我读到的内容看来,仅使用 Google Accounts API
我无法将我的域指向我使用 Google App Engine 托管的网站。这是背景……注意区分“google apps”(域托管、电子邮件等)和“google app engine”(网站框架)的概念
是否可以通过 App Engine 上内置的 OpenId 实现单点登录?我一直在尝试集成一个 Marketplace 应用程序,并让用户在来自 Google Apps(管理面板或通用导航)时登录。我
有没有办法从 azure-cli 为 Web 应用或函数应用创建和/或激活 App Insights? 现在浏览文档。 最佳答案 我之前也考虑过你的问题。要创建应用程序洞察力,az resource
我在以 Angular 创建新项目时遇到问题。当我运行 ng new myapp 命令时,我得到以下命令 ng 新问候语 Error: Path "/app/app.module.ts" does n
我是一名优秀的程序员,十分优秀!