letmejustputthishere / vite-sveltekit-motoko-ii

Starter project for Vite + SvelteKit + TypeScript + Motoko + Internet Identity + PocketIC
4 stars 0 forks source link

gitpod: initial commands produce error #15

Open marc0olo opened 1 month ago

marc0olo commented 1 month ago

I just tested the starter with gitpod using VSCode Desktop as recommended and experienced following errors during startup:

.
.
.
Error: Failed while trying to deploy canisters.
Caused by: Failed to build all canisters.
Caused by: Failed while trying to build all canisters.
Caused by: The post-build step failed for canister 'bd3sg-teaaa-aaaaa-qaaba-cai' (frontend)
Caused by: Failed to build frontend for network 'local'.
Caused by: The command 'cd "/workspaces/vite-sveltekit-motoko-ii" && CANISTER_CANDID_PATH="/workspaces/vite-sveltekit-motoko-ii/.dfx/local/canisters/frontend/assetstorage.did" CANISTER_CANDID_PATH_BACKEND="/workspaces/vite-sveltekit-motoko-ii/.dfx/local/canisters/backend/backend.did" CANISTER_ID="bd3sg-teaaa-aaaaa-qaaba-cai" CANISTER_ID_BACKEND="bkyz2-fmaaa-aaaaa-qaaaq-cai" CANISTER_ID_FRONTEND="bd3sg-teaaa-aaaaa-qaaba-cai" CANISTER_ID_INTERNET_IDENTITY="rdmx6-jaaaa-aaaaa-aaadq-cai" DFX_NETWORK="local" DFX_VERSION="0.23.0" "npm" "run" "build"' failed with exit status 'exit status: 1'.
Stdout:

> vite-sveltekit-motoko@0.0.1 build
> vite build

vite v5.4.8 building SSR bundle for production...
transforming...
✓ 83 modules transformed.

Stderr:
x Build failed in 672ms
error during build:
Could not resolve "../declarations/backend" from "src/routes/+page.svelte"
file: /workspaces/vite-sveltekit-motoko-ii/src/routes/+page.svelte
    at getRollupError (file:///workspaces/vite-sveltekit-motoko-ii/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
    at error (file:///workspaces/vite-sveltekit-motoko-ii/node_modules/rollup/dist/es/shared/parseAst.js:388:42)
    at ModuleLoader.handleInvalidResolvedId (file:///workspaces/vite-sveltekit-motoko-ii/node_modules/rollup/dist/es/shared/node-entry.js:19273:24)
    at file:///workspaces/vite-sveltekit-motoko-ii/node_modules/rollup/dist/es/shared/node-entry.js:19233:26

[120242 ms] postAttachCommand failed with exit code 255. Skipping any further user-provided commands.
Done. Press any key to close the terminal.
marc0olo commented 1 month ago

I think I got it working by starting the playground again via dfx start --background and then executing dfx deploy, but somehow the remote connection got lost then.

seems kind of unstable with Gitpod. not sure if this should be advertised. would be interesting to know if anybody else faces the same issue with Gitpod in combination with VSCode Desktop 🤔

marc0olo commented 1 month ago

I am also asked by VSCode to "reopen the workspace with the devcontainer". when I do not do that there appears a permission issue.

just FYI, after the 3rd attempt it now seems to work in the devcontainer:

image

image

image