Closed dejurin closed 8 months ago
Thank you, will check it soon
cc @AmirSa12
Hi @dejurin,
I forgot to update the example, although this should've worked for you, because I configured the files in the root workspace. anyways, I will update the example.
to let you know, just add "resolutions": { "sharp": "0.32.6" }
in the package.json file, and this should resolve the issue. let me know if you encounter any other issues!
Thank you. After a few hours, I will test my production. I will text.
Fail.
2024-03-03T21:26:01.839927Z Cloning repository...
2024-03-03T21:26:02.877567Z From https://github.com/dejurin/pwa-example
2024-03-03T21:26:02.878117Z * branch 365d29d326d9dee8ee98919842bebac988bd57ae -> FETCH_HEAD
2024-03-03T21:26:02.878247Z
2024-03-03T21:26:02.932271Z HEAD is now at 365d29d 18
2024-03-03T21:26:02.9327Z
2024-03-03T21:26:03.030438Z
2024-03-03T21:26:03.030959Z Using v2 root directory strategy
2024-03-03T21:26:03.060198Z Success: Finished cloning repository files
2024-03-03T21:26:03.778636Z Detected the following tools from environment: nodejs@18.17.1, npm@9.6.7
2024-03-03T21:26:03.779331Z Installing project dependencies: npm install --progress=false
2024-03-03T21:26:15.742437Z npm WARN deprecated rollup-plugin-inject@3.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
2024-03-03T21:26:15.799307Z npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
2024-03-03T21:26:22.750904Z
2024-03-03T21:26:22.75115Z added 486 packages, and audited 487 packages in 18s
2024-03-03T21:26:22.751312Z
2024-03-03T21:26:22.751467Z 207 packages are looking for funding
2024-03-03T21:26:22.751599Z run `npm fund` for details
2024-03-03T21:26:22.753092Z
2024-03-03T21:26:22.753275Z found 0 vulnerabilities
2024-03-03T21:26:22.777618Z Executing user command: pnpm run build
2024-03-03T21:26:23.640056Z
2024-03-03T21:26:23.640306Z > example@ build /opt/buildhome/repo
2024-03-03T21:26:23.640468Z > qwik build
2024-03-03T21:26:23.640585Z
2024-03-03T21:26:23.724894Z
2024-03-03T21:26:23.72515Z ............
2024-03-03T21:26:23.725297Z .::: :--------:.
2024-03-03T21:26:23.725485Z .:::: .:-------:.
2024-03-03T21:26:23.725625Z .:::::. .:-------.
2024-03-03T21:26:23.72574Z ::::::. .:------.
2024-03-03T21:26:23.725976Z ::::::. :-----:
2024-03-03T21:26:23.72625Z ::::::. .:-----.
2024-03-03T21:26:23.726383Z :::::::. .-----.
2024-03-03T21:26:23.726516Z ::::::::.. ---:.
2024-03-03T21:26:23.726653Z .:::::::::. :-:.
2024-03-03T21:26:23.726785Z ..::::::::::::
2024-03-03T21:26:23.726898Z ...::::
2024-03-03T21:26:23.727019Z
2024-03-03T21:26:23.727164Z
2024-03-03T21:26:23.727586Z
2024-03-03T21:26:23.72787Z pnpm run build.client
2024-03-03T21:26:23.728062Z pnpm run build.server
2024-03-03T21:26:23.728218Z
2024-03-03T21:26:24.328306Z
2024-03-03T21:26:24.328618Z > example@ build.client /opt/buildhome/repo
2024-03-03T21:26:24.328799Z > vite build
2024-03-03T21:26:24.328983Z
2024-03-03T21:26:24.570667Z [33mThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m
2024-03-03T21:26:25.292697Z [36mvite v5.1.4 [32mbuilding for production...[36m[39m
2024-03-03T21:26:25.456341Z transforming...
2024-03-03T21:26:25.538528Z munmap_chunk(): invalid pointer
2024-03-03T21:26:25.547929Z Aborted
2024-03-03T21:26:25.552407Z ELIFECYCLE Command failed with exit code 134.
2024-03-03T21:26:25.593662Z ELIFECYCLE Command failed with exit code 1.
2024-03-03T21:26:25.622444Z Failed: Error while executing user command. Exited with error code: 1
2024-03-03T21:26:25.635758Z Failed: build command exited with code: 1
2024-03-03T21:26:26.456146Z Failed: error occurred while running build command
package.json
{
"name": "example",
"description": "Demo App with Routing built-in (recommended)",
"engines": {
"node": ">=15.0.0"
},
"trustedDependencies": [
"sharp"
],
"resolutions": {
"sharp": "0.32.6"
},
"scripts": {
"build": "qwik build",
"build.client": "vite build",
"build.preview": "vite build --ssr src/entry.preview.tsx",
"build.server": "vite build -c adapters/cloudflare-pages/vite.config.ts",
"deploy": "wrangler pages publish ./dist",
"dev": "vite --mode ssr",
"dev.custom": "CUSTOM_CONFIG=true vite --mode ssr",
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
"fmt": "prettier --write .",
"fmt.check": "prettier --check .",
"preview": "qwik build preview && vite preview",
"serve": "wrangler pages dev ./dist",
"start": "vite --open --mode ssr",
"qwik": "qwik"
},
"devDependencies": {
"@builder.io/qwik": "^1.4.5",
"@builder.io/qwik-city": "^1.4.5",
"@qwikdev/pwa": "^0.0.4",
"@types/eslint": "^8.56.5",
"@types/node": "^20.11.24",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@vite-pwa/assets-generator": "^0.2.4",
"eslint": "^8.57.0",
"eslint-plugin-qwik": "^1.4.5",
"fast-glob": "^3.3.2",
"prettier": "^3.2.5",
"typescript": "^5.3.3",
"undici": "^6.7.0",
"vite": "^5.1.4",
"vite-tsconfig-paths": "^4.3.1",
"wrangler": "^3.30.1"
}
}
@dejurin it's green in here: https://github.com/AmirSa12/pwa-example-bug
Thank you.
So, I got successful result. Thank you all who helped me.
Conclusion
PNPM
pnpm install --no-frozen-lockfile
Bun
package.json
{
"name": "example",
"description": "Demo App with Routing built-in (recommended)",
"engines": {
"node": ">=18.0.0"
},
"trustedDependencies": [
"sharp"
],
"scripts": {
"build": "qwik build",
"build.client": "vite build",
"build.preview": "vite build --ssr src/entry.preview.tsx",
"build.server": "vite build -c adapters/cloudflare-pages/vite.config.ts",
"deploy": "wrangler pages publish ./dist",
"dev": "vite --mode ssr",
"dev.custom": "CUSTOM_CONFIG=true vite --mode ssr",
"dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
"fmt": "prettier --write .",
"fmt.check": "prettier --check .",
"preview": "qwik build preview && vite preview",
"serve": "wrangler pages dev ./dist",
"start": "vite --open --mode ssr",
"qwik": "qwik"
},
"devDependencies": {
"@builder.io/qwik": "^1.5.0",
"@builder.io/qwik-city": "^1.5.0",
"@qwikdev/pwa": "^0.0.4",
"@types/eslint": "^8.56.5",
"@types/node": "^20.11.24",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@vite-pwa/assets-generator": "^0.2.4",
"eslint": "^8.57.0",
"eslint-plugin-qwik": "^1.5.0",
"fast-glob": "^3.3.2",
"prettier": "^3.2.5",
"typescript": "^5.3.3",
"undici": "^6.7.0",
"vite": "^5.1.5",
"vite-tsconfig-paths": "^4.3.1",
"wrangler": "^3.30.1"
},
"resolutions": {
"sharp": "0.32.6"
}
}
I appreciate your patience and the helpful reproductions! And thanks to @AmirSa12 for the hard work on the PR too.
Hello, there I got problem again.
I copy your example and change it only:
Repo: https://github.com/dejurin/pwa-example/blob/main/package.json
I tried pnpm and npm ... I tried remove pnpm-lock.yaml file, and update all deps, nothing works... Please, try to build for Cloudflare.
Build log fail