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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Can't run with npm run dev #927

Open
1 task
aliahadmd opened this issue Jan 1, 2025 · 2 comments · May be fixed by #928
Open
1 task

[🐛 Bug]: Can't run with npm run dev #927

aliahadmd opened this issue Jan 1, 2025 · 2 comments · May be fixed by #928
Labels
bug Something isn't working

Comments

@aliahadmd
Copy link

next-on-pages environment related information

li@a:~/app/projects/aliahaddotcom$ npx @cloudflare/next-on-pages --info

System:
Platform: linux
Arch: x64
Version: #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 8 GB
Shell: /bin/bash
Package Manager Used: npm (10.9.0)

Relevant Packages:
@cloudflare/next-on-pages: 1.13.7
vercel: 39.2.2
next: 15.1.0

li@a:~/app/projects/aliahaddotcom$

Description

li@a:~/app/projects/aliahaddotcom$ npm run dev

[email protected] dev
next dev

/home/li/app/projects/aliahaddotcom/next.config.compiled.js:16
await (0, _nextdev.setupDevPlatform)();
^

ReferenceError: await is not defined
at Object. (/home/li/app/projects/aliahaddotcom/next.config.compiled.js:16:5)
at Module._compile (node:internal/modules/cjs/loader:1565:14)
at requireFromString (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/build/next-config-ts/require-hook.js:81:7)
at transpileConfig (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/build/next-config-ts/transpile-config.js:63:51)
at async loadConfig (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/server/config.js:771:36)
at async Module.nextDev (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/cli/next-dev.js:190:14)

Node.js v22.12.0

Reproduction

No response

Pages Deployment Method

Direct Upload (wrangler pages publish or the @cloudflare/pages-action GitHub Action)

Pages Deployment ID

No response

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@aliahadmd aliahadmd added the bug Something isn't working label Jan 1, 2025
@aliahadmd
Copy link
Author

Second time tried:

li@a:/app/projects/aliahaddotcom$ rm -rf .next/
li@a:
/app/projects/aliahaddotcom$ rm -rf .vercel/
li@a:/app/projects/aliahaddotcom$ rm -rf node_modules/
li@a:
/app/projects/aliahaddotcom$ npm i
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
npm warn deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
npm warn deprecated [email protected]: This package is no longer supported.
npm warn deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

added 643 packages, and audited 644 packages in 25s

162 packages are looking for funding
run npm fund for details

13 vulnerabilities (3 low, 1 moderate, 9 high)

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.
li@a:~/app/projects/aliahaddotcom$ npm run dev

[email protected] dev
next dev

/home/li/app/projects/aliahaddotcom/next.config.compiled.js:16
await (0, _nextdev.setupDevPlatform)();
^

ReferenceError: await is not defined
at Object. (/home/li/app/projects/aliahaddotcom/next.config.compiled.js:16:5)
at Module._compile (node:internal/modules/cjs/loader:1565:14)
at requireFromString (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/build/next-config-ts/require-hook.js:81:7)
at transpileConfig (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/build/next-config-ts/transpile-config.js:63:51)
at async loadConfig (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/server/config.js:771:36)
at async Module.nextDev (/home/li/app/projects/aliahaddotcom/node_modules/next/dist/cli/next-dev.js:190:14)

Node.js v22.12.0
li@a:~/app/projects/aliahaddotcom$

@zammitjohn
Copy link

Duplicates #925

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
2 participants