🐛 BUG: SolidJs and cloudflare workers doesnt work
What version of astro are you using?
1.0.0-beta.73
Are you using an SSR adapter? If so, which one?
Cloudflare
What package manager are you using?
yarn
What operating system are you using?
Windows
Describe the Bug
When running solidjs with the cloudflare ssr adapter, it errors with Error: Pa is not supported in the browser, returning undefined
Link to Minimal Reproducible Example
https://github.com/PringlePot/astro-solid-and-cloudflare
Participation
- [ ] I am willing to submit a pull request for this issue.
Just updated the link to a github repo that recreates the issue
This issue consists when updating to v1.0.0-rc.6
@matthewp Is this issue available to work on?
I can't get them working together in the latest versions
{
"name": "@example/basics",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && tsc && astro build",
"preview": "wrangler pages dev ./dist",
"astro": "astro"
},
"devDependencies": {
"@astrojs/cloudflare": "^1.0.1",
"@astrojs/solid-js": "^1.1.0",
"@astrojs/tailwind": "^1.0.0",
"astro": "^1.1.1",
"solid-js": "^1.4.3",
"wrangler": "^2.0.27"
}
}
yarn dev works fine
yarn build seems to work
yarn preview gives this:
$ yarn preview
yarn run v1.22.19
$ wrangler pages dev ./dist
🚧 'wrangler pages <command>' is a beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose
✘ [ERROR] _worker.js is importing from another file. This will throw an error if deployed.
You should bundle your Worker or remove the import if it is unused.
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [c] clear console, [x] to exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Starting inspector on 0.0.0.0:9229 failed: address already in use
[pages:wrn] Service bindings are experimental. There may be breaking changes in the future.
[pages:inf] Worker reloaded! (126.90KiB)
[pages:inf] Listening on 0.0.0.0:8788
[pages:inf] - http://127.0.0.1:8788
[pages:inf] - http://10.0.0.114:8788
[pages:inf] - http://100.78.77.87:8788
[pages:inf] Updated `Request.cf` object cache!
Error: An is not supported in the browser, returning undefined
I can access the page at http://127.0.0.1:8788 but the SolidJS component doesn't load.