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

[ERROR] Can't run site locally #7010

Closed
milen-prg opened this issue Aug 31, 2024 · 2 comments
Closed

[ERROR] Can't run site locally #7010

milen-prg opened this issue Aug 31, 2024 · 2 comments
Labels

Comments

@milen-prg
Copy link

URL:

https://github.com/nodejs/nodejs.org.git

Browser Name:

Firefox

Browser Version:

129.0.2

Operating System:

Windows 11 Pro 64bit

How to reproduce the issue:

❯ git clone --recursive https://github.com/nodejs/nodejs.org.git
Cloning into 'nodejs.org'...
remote: Enumerating objects: 54148, done.
remote: Counting objects: 100% (253/253), done.
remote: Compressing objects: 100% (187/187), done.
remote: Total 54148 (delta 93), reused 186 (delta 44), pack-reused 53895 (from 1)
Receiving objects: 100% (54148/54148), 102.52 MiB | 7.38 MiB/s, done.
Resolving deltas: 100% (37395/37395), done.

❯ cd nodejs.org\

░▒▓ 📁 D:\Documentation\NodeJS\nodejs.org on  main ▓▒░ npm ci ░▒▓ at съб 14:41 🕒 ▓▒░
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: undefined,
npm warn EBADENGINE required: { node: 'v20' },
npm warn EBADENGINE current: { node: 'v22.7.0', npm: '10.8.3' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: undefined,
npm warn EBADENGINE required: { node: 'v20' },
npm warn EBADENGINE current: { node: 'v22.7.0', npm: '10.8.3' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: undefined,
npm warn EBADENGINE required: { node: 'v20' },
npm warn EBADENGINE current: { node: 'v22.7.0', npm: '10.8.3' }
npm warn EBADENGINE }
npm warn deprecated inflight@1.0.6: 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 @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead

prepare
husky

added 2143 packages, and audited 2145 packages in 47s

510 packages are looking for funding
run npm fund for details

1 moderate severity vulnerability

To address all issues, run:
npm audit fix

Run npm audit for details.

❯ npx turbo dev
turbo 2.0.11

WARNING stale pid file at "C:\Users\User\AppData\Local\Temp\turbod\22edb148bf76988c\turbod.pid"
• Packages in scope: @nodejs/website
• Running dev in 1 packages
• Remote caching disabled
@nodejs/website:dev: cache bypass, force executing 61f5cdc828fa7283
@nodejs/website:dev:
@nodejs/website:dev: > dev
@nodejs/website:dev: > cross-env NODE_NO_WARNINGS=1 next dev --turbo
@nodejs/website:dev:
@nodejs/website:dev: file:///D:/Documentation/NodeJS/nodejs.org/apps/site/next.json.mjs:3
@nodejs/website:dev: import _authors from './authors.json' assert { type: 'json' };
@nodejs/website:dev: ^^^^^^
@nodejs/website:dev:
@nodejs/website:dev: SyntaxError: Unexpected identifier 'assert'
@nodejs/website:dev: at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
@nodejs/website:dev: at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
@nodejs/website:dev: at callTranslator (node:internal/modules/esm/loader:436:14)
@nodejs/website:dev: at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)
@nodejs/website:dev:
@nodejs/website:dev: Node.js v22.7.0
@nodejs/website:dev: npm error Lifecycle script dev failed with error:
@nodejs/website:dev: npm error code 1
@nodejs/website:dev: npm error path D:\Documentation\NodeJS\nodejs.org\apps\site
@nodejs/website:dev: npm error workspace @nodejs/website
@nodejs/website:dev: npm error location D:\Documentation\NodeJS\nodejs.org\apps\site
@nodejs/website:dev: npm error command failed
@nodejs/website:dev: npm error command C:\Windows\system32\cmd.exe /d /s /c cross-env NODE_NO_WARNINGS=1 next dev --turbo
@nodejs/website:dev: ERROR: command finished with error: command (D:\Documentation\NodeJS\nodejs.org\apps\site) C:\Program Files\nodejs\npm.cmd run dev exited (1)
@nodejs/website#dev: command (D:\Documentation\NodeJS\nodejs.org\apps\site) C:\Program Files\nodejs\npm.cmd run dev exited (1)

Tasks: 0 successful, 1 total
Cached: 0 cached, 1 total
Time: 871ms
Failed: @nodejs/website#dev

ERROR run failed: command exited (1)

░▒▓ 📁 D:\Documentation\NodeJS\nodejs.org on  main ▓▒░

@milen-prg milen-prg added the bug label Aug 31, 2024
@AugustinMauroy
Copy link
Member

As NPM points out, you're using the wrong version of node to run the project, so there's a difference in how to import JSON with node, which makes for a breaking change.

@aduh95
Copy link
Contributor

aduh95 commented Sep 3, 2024

there's a difference in how to import JSON with node

Not exactly, Node.js 20.x does still support the old assert syntax to avoid a breaking change, but it also supports the new with syntax, as Node.js 22.x. We should update to the new syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants