小编plu*_*ium的帖子

Failure starting Docker container. "failed to create shim task: OCI runtime create failed: runc create failed"

I am new to Ubuntu and new to Docker. I am running a command that was given to me in an explanation of how to start the project. I want to start my Docker containers and they fail with an error.

Some notes:

  • It is a new Ubuntu laptop.
  • 我添加了Docker以获得sudo特权。在它响应的列表中groups产生。docker

这是我用来启动它的命令:docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build

它给出:

Step 11/12 : EXPOSE $PORT
 ---> Using cache
 ---> 7620427ebfe9
Step 12/12 : CMD ["ts-node", …
Run Code Online (Sandbox Code Playgroud)

docker docker-compose

56
推荐指数
5
解决办法
25万
查看次数

如何从普通的 Svelte 迁移到添加 SvelteKit 功能?

我使用 Svelte 模板中的 Vite 创建了一个 svelte 应用程序。我有一个很小的 ​​package.json,我想开始使用 Sveltekit。这是package.json

{
    "name": "jxb2",
    "private": true,
    "version": "0.0.0",
    "type": "module",
    "scripts": {
        "dev": "vite",
        "build": "vite build",
        "preview": "vite preview"
    },
    "devDependencies": {
        "@sveltejs/vite-plugin-svelte": "^2.0.2",
        "svelte": "^3.55.1",
        "vite": "^4.1.0"
    },
    "dependencies": {
        "axios": "^1.3.2"
    }
}
Run Code Online (Sandbox Code Playgroud)

然而,文档没有提及任何有关进行此升级的内容。Sveltekit 谈论了如何创建项目,但没有提及从 svelte 升级。我想使用路由功能

我可以找到有关从 sapper 迁移的页面,但我不想这样做,我想从 Svelte 到达那里

javascript svelte sveltekit

9
推荐指数
1
解决办法
1147
查看次数

使用 recharts 和 nextjs 发生水合失败错误

我刚刚开始一个新的 Next 项目,我想使用一个名为ReCharts 的库。

但是,每当我在项目中使用它时,即使使用提供的示例之一,它也会引发以下错误:

Error: Hydration failed because the initial UI does not match what was rendered on the server.

Warning: An error occurred during hydration. The server HTML was replaced with client content in `<div>`.

Warning: Prop `y` did not match. Server: "5" Client: "10.800000190734863"
    at text
    at Text (webpack-internal:///./node_modules/recharts/es6/component/Text.js:232:5)
    at g
    at Layer (webpack-internal:///./node_modules/recharts/es6/container/Layer.js:23:24)
    at g
    at g
    at Layer (webpack-internal:///./node_modules/recharts/es6/container/Layer.js:23:24)
    at CartesianAxis (webpack-internal:///./node_modules/recharts/es6/cartesian/CartesianAxis.js:77:5)
    at svg
    at Surface (webpack-internal:///./node_modules/recharts/es6/container/Surface.js:23:24)
    at div
    at CategoricalChartWrapper (webpack-internal:///./node_modules/recharts/es6/chart/generateCategoricalChart.js:920:7)
    at …
Run Code Online (Sandbox Code Playgroud)

reactjs next.js recharts

6
推荐指数
1
解决办法
3486
查看次数

运行测试时,玩笑测试给我“找不到模块”,但代码在测试之外编译得很好。这是怎么回事?

我正在使用 NestJS 和 TypeScript 为大型应用程序编写第一个测试。我想导入一个实体,该实体从另一个文件夹中的模块导入接口。事实证明,这具有挑战性。

该项目的结构如下

apps
..apis
--..web-api
----..src
----..package.json
----..jest.config.js
------..app
--------..profiles
----------.._entities
------------..profile.entity.spec.ts <--- the test
------------..profile.entity.ts


libs
--app-interfaces
----src
------lib
--------profile
----------index.ts <--- the files the test is trying to import and test 
----------gender.enum.ts
----------profile.interface.ts
Run Code Online (Sandbox Code Playgroud)

在 profile.entity.spec.ts 中我有:

apps
..apis
--..web-api
----..src
----..package.json
----..jest.config.js
------..app
--------..profiles
----------.._entities
------------..profile.entity.spec.ts <--- the test
------------..profile.entity.ts


libs
--app-interfaces
----src
------lib
--------profile
----------index.ts <--- the files the test is trying to import and test 
----------gender.enum.ts
----------profile.interface.ts
Run Code Online (Sandbox Code Playgroud)

在 profile.entity.ts 中:

import { …
Run Code Online (Sandbox Code Playgroud)

jestjs nestjs

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