0

I'm Using @sveltejs/adapter-cloudflare to deploy my project to Cloudflare Pages. I'm tried to use this package for a simple sveletKit app. It can success deploy to Pages. But with more complex project, I got many many ERROR log while run build.

This is the log: https://pastebin.com/Yhw1Gu0c

And this is my package.json

    "name": "app",
    "version": "0.0.1",
    "scripts": {
        "dev": "vite dev --port 3331",
        "build": "vite build",
        "package": "svelte-kit package",
        "preview": "vite preview",
        "test": "playwright test",
        "check": "svelte-check --tsconfig ./tsconfig.json",
        "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
        "lint": "prettier --check --plugin-search-dir=. . && eslint .",
        "format": "prettier --write --plugin-search-dir=. ."
    },
    "devDependencies": {
        "@carbon/colors": "^11.3.0",
        "@firebase/app-types": "^0.7.0",
        "@playwright/test": "^1.22.2",
        "@solana/qr-code-styling": "1.6.0-beta.0",
        "@sveltejs/adapter-auto": "next",
        "@sveltejs/adapter-cloudflare": "^1.0.0-next.31",
        "@sveltejs/kit": "next",
        "@typescript-eslint/eslint-plugin": "^5.27.0",
        "@typescript-eslint/parser": "^5.27.0",
        "bignumber.js": "^9.0.2",
        "carbon-components-svelte": "^0.67.4",
        "carbon-icons-svelte": "^11.2.0",
        "carbon-preprocess-svelte": "^0.9.1",
        "cookie": "^0.5.0",
        "eslint": "^8.16.0",
        "eslint-config-prettier": "^8.3.0",
        "eslint-plugin-svelte3": "^4.0.0",
        "firebase-admin": "^11.0.1",
        "prettier": "^2.6.2",
        "prettier-plugin-svelte": "^2.7.0",
        "sass": "^1.54.0",
        "svelte": "^3.44.0",
        "svelte-check": "^2.7.1",
        "svelte-preprocess": "^4.10.6",
        "tslib": "^2.3.1",
        "typescript": "^4.7.4",
        "vite": "^3.0.0"
    },
    "type": "module",
    "dependencies": {
        "@solana/web3.js": "^1.50.1",
        "firebase": "^9.9.1"
    }
}
  • See [this answer](https://stackoverflow.com/a/73222998/14978104) – henry groves Aug 06 '22 at 15:15
  • Does this answer your question? [SvelteKit: Packages not being able to access node functions](https://stackoverflow.com/questions/73178856/sveltekit-packages-not-being-able-to-access-node-functions) – henry groves Aug 07 '22 at 10:18
  • Yes, this is answer my question. In previous projects we often used Vercel's services. Maybe my friends used the old way for this project. – Benjdinh Aug 07 '22 at 13:47
  • Although I'd like to find a way to deploy this project to Pages quickly. Instead of having to replace it with other packages – Benjdinh Aug 07 '22 at 13:58
  • to deploy your project to Cloudflare Pages you'll have to follow [this guide](https://vitejs.dev/guide/static-deploy.html#cloudflare-pages) (and then see [here](https://vitejs.dev/guide/static-deploy.html#cloudflare-pages) for specifically cloudflare pages). NB: Cloudflare Pages is a static site hosting platform. If your project needs to be dynamic you will have to choose a hosting provider that supports this – henry groves Aug 07 '22 at 14:17

0 Answers0