Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: import { getRequestContext } from "@cloudflare/next-on-pages"; not working as expected #744

Open
1 task
coratype opened this issue Apr 17, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@coratype
Copy link

next-on-pages environment related information

npx @cloudflare/next-on-pages --info

System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
CPU: (10) arm64 Apple M1 Pro
Memory: 16 GB
Shell: /bin/zsh
Package Manager Used: npm (8.19.2)

Relevant Packages:
@cloudflare/next-on-pages: 1.11.0
vercel: N/A
next: N/A

Description

i'm trying to initiate the new setupDevPlatform() functionality, i have installed @cloudflare/next-on-pages via npm install as a dependency, however i seem to be getting an error when trying to import it.

Screenshot 2024-04-16 at 11 09 10鈥疨M

Reproduction

No response

Pages Deployment Method

None

Pages Deployment ID

No response

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@coratype coratype added the bug Something isn't working label Apr 17, 2024
@coratype
Copy link
Author

this bug was my last straw with cloudflare. i really wanted to just keep everything under cloudflare and migrate my nextjs app over but i have spent countless days fighting against the development experience with cloudflare. the documentation for one has a hundred different variations on how to access the ENV variable in server routes. it also has several different variations on how to structure the routes. in some cases, the former doesnt even work. there are different configuration files you have to set up, for both local and production. there are specific things you have to include inline when running commands. there are types you have to setup manually within the configuration files which again there are several different versions of. its genuinely really annoying to keep track of, and i hope eventually one day cloudflare learns to just simplify things as well as vercel has because as much as i prefer to use cloudflare, vercel truly is one click deploy (although im not using vercel anymore either).

@dazweeja
Copy link

Does @cloudflare/next-on-pages appear in your package.json?

@coratype
Copy link
Author

yes but i鈥檝e since given up on cloudflare i鈥檓 hosting on a VPS now

@jebadirad
Copy link

+1 on this. I am also having a lot of issues with cloudflare next on pages, and this is my latest issue im trying to fight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants