小编jcp*_*den的帖子

Docker/Cypress 容器由于 M1 芯片上的 Qemu 错误而失败

我有一个 Docker 镜像,我想在本地运行,但我相信它由于 Qemu 问题而失败,这似乎源于尝试在 M1 芯片上运行 Cypress:

REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
dna          local     097c5f291db5   2 hours ago   3.66GB
Run Code Online (Sandbox Code Playgroud)

当我尝试使用本地运行图像时,docker run dna:local我得到以下信息:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
yarn run v1.22.10
$ concurrently "yarn:start:ui" "yarn:start:api" "cypress run"
[start:api] $ cd api && yarn start:dev
[start:ui] $ cd ui && yarn start
[2] [STARTED] Task without title.
[start:api] $ DEBUG=socket.io:* DISABLE_AD=1 USE_MEMORY_DB=true nodemon …
Run Code Online (Sandbox Code Playgroud)

docker cypress apple-m1

11
推荐指数
2
解决办法
8178
查看次数

无法启动mysqld_safe来重置root密码

我安装了MySQL并且正在尝试使用密码设置来尝试让Wordpress连接到它.这样做,我似乎已经删除了我的root密码,现在无法登录.

我正在尝试通过运行来重置密码

/etc/init.d/mysqld stop
Run Code Online (Sandbox Code Playgroud)

然后

mysqld_safe --skip-grant-tables
Run Code Online (Sandbox Code Playgroud)

哪个输出

Starting mysql daemon with databases from /var/lib/mysql
Run Code Online (Sandbox Code Playgroud)

但后来什么也没做.它既不成功也不失败.我没有任何数据库设置所以我很乐意删除并重新安装mysql如果有必要,但我尝试了无济于事.我怎么能回来?

mysql centos root

8
推荐指数
1
解决办法
3万
查看次数

将 React 脚本从 v.3.4.4 更新到 v.4.0.3 后单元测试失败

我正在为客户开发一个新项目,并被要求将 create-react-app (react-scripts) 从 v.2.0.5 更新到 v.4.0.3。我这样做了,但一堆单元测试失败了。我回顾了该项目,并将重大更改隔离为从 React-scripts 3.4.4 到 4.0.0 的更新。

基本上,我看到的主要错误似乎适用于针对 async/await 方法运行的任何测试。Jest 报告测试超时,但这些测试只是因为失败而超时。它们都在早期版本的react-scripts(以及我猜的早期版本的Jest)上顺利通过。

thrown: "Exceeded timeout of 5000 ms for a test.
    Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
Run Code Online (Sandbox Code Playgroud)

超时似乎与承诺问题有关,因为它之前出现了以下错误:

TypeError: Cannot read property 'then' of undefined
Run Code Online (Sandbox Code Playgroud)

还有一个相当难以辨认的堆栈跟踪,其中列出了节点模块的负载。

这是失败的测试的示例:

 test('dispatching fetchPublishedArticlesAuthors action causes an API GET and updates the store', async (done) => {

    const options = { page: 0, size: 20, sort: 'createdBy.firstName,asc' };

    store.dispatch(fetchPublishedArticlesAuthors(options));

    const state = await stateChange(store); …
Run Code Online (Sandbox Code Playgroud)

reactjs jestjs create-react-app

3
推荐指数
1
解决办法
1620
查看次数

标签 统计

apple-m1 ×1

centos ×1

create-react-app ×1

cypress ×1

docker ×1

jestjs ×1

mysql ×1

reactjs ×1

root ×1