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

Node v19 throws an error: 'The "name" argument must be specified' #19682

Closed
insekticid opened this issue Mar 14, 2023 · 51 comments · Fixed by #19687
Closed

Node v19 throws an error: 'The "name" argument must be specified' #19682

insekticid opened this issue Mar 14, 2023 · 51 comments · Fixed by #19687

Comments

@insekticid
Copy link

Environment

Nuxi 3.2.3

RootDir: /app
Nuxt project info:


  • Operating System: Linux
  • Node Version: v19.7.0
  • Nuxt Version: 3.2.3
  • Nitro Version: 2.3.1
  • Package Manager: pnpm@7.29.1
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

docker run --rm -it node:19-alpine sh

npm add -g pnpm
pnpm dlx nuxi init app
cd app
pnpm install

Describe the bug

Nuxi 3.3.1

ERROR The "name" argument must be specified

at new NodeError (node:internal/errors:399:5)
at Performance.mark (node:internal/perf/performance:125:13)
at normalizedModule (node_modules/.pnpm/@nuxt+kit@3.3.1/node_modules/@nuxt/kit/dist/index.mjs:168:30)
at async installModule (node_modules/.pnpm/@nuxt+kit@3.3.1/node_modules/@nuxt/kit/dist/index.mjs:451:15)
at async initNuxt (node_modules/.pnpm/nuxt@3.3.1/node_modules/nuxt/dist/index.mjs:2469:7)
at async loadNuxt (node_modules/.pnpm/nuxt@3.3.1/node_modules/nuxt/dist/index.mjs:2523:5)
at async loadNuxt (node_modules/.pnpm/@nuxt+kit@3.3.1/node_modules/@nuxt/kit/dist/index.mjs:539:19)
at async Object.invoke (node_modules/.pnpm/nuxi@3.3.1/node_modules/nuxi/dist/chunks/prepare.mjs:37:18)
at async _main (node_modules/.pnpm/nuxi@3.3.1/node_modules/nuxi/dist/cli.mjs:49:20)

 ELIFECYCLE  Command failed with exit code 1.

image

Additional context

No response

Logs

No response

@danielroe
Copy link
Member

Would you try running with a different node version?

@insekticid
Copy link
Author

insekticid commented Mar 14, 2023

@danielroe

node v 18 seems ok

Nuxi 3.3.1
✔ Types generated in .nuxt

devDependencies:

  • nuxt 3.3.1

Done in 1m 23.9s
/app # node -v
v18.14.2


@ postinstall /app
nuxt prepare

Nuxi 3.3.1 15:39:39
✔ Types generated in .nuxt 15:39:40

devDependencies:

  • nuxt 3.3.1

Done in 1m 16.6s
/app # node -v
v18.15.0

@palachX
Copy link

palachX commented Mar 14, 2023

I also have, in clear start project Version 3.3.1, when i use npm install

On version 3.3.0 i have error Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol
'd:'

@danielroe
Copy link
Member

In that case, I think it might be a node 19 bug.

performance.mark() does not need an explicit name in the Node 19 documentation: https://nodejs.org/api/perf_hooks.html#performancemarkname-options.

@palachX
Copy link

palachX commented Mar 14, 2023

Member

I test it in node v18.1, after which i upgraded to 19.7 but there is an error

@insekticid
Copy link
Author

insekticid commented Mar 14, 2023

node v 19.1

force use @nuxt/kit in v3.2.3 in package.json

{
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "devDependencies": {
    "nuxt": "3.2.3",
    "@nuxt/kit": "3.2.3"
  }
}

@ postinstall /app
nuxt prepare

Nuxi 3.2.3
✔ Types generated in .nuxt

devDependencies:

  • @nuxt/kit 3.2.3 (3.3.1 is available)
  • nuxt 3.3.1
  • nuxt 3.2.3 (3.3.1 is available)

Done in 43.4s

/app # node -v
v19.1.0

@danielroe
Copy link
Member

For now, would you use Node v18?

@palachX
Copy link

palachX commented Mar 14, 2023

Version nuxt 3.2.3 work in node 18.1 and 19.7

3.3.0 and 3.3.1 not work in node 18.1 and 19.7 i tested it

@insekticid
Copy link
Author

@palachX yes, but nuxt 3.2.3 works in node 19 only when forced "@nuxt/kit": "3.2.3" otherwise v3.3 will be installed, and will end up with error The "name" argument must be specified

@palachX
Copy link

palachX commented Mar 14, 2023

@palachX yes, but nuxt 3.2.3 works in node 19 only when forced "@nuxt/kit": "3.2.3" otherwise v3.3 will be installed, and will end up with error The "name" argument must be specified

Yeap

@ItzExotical
Copy link
Sponsor

image

@vernaillen
Copy link

vernaillen commented Mar 14, 2023

I had the same issue after updating Nuxt to 3.3.1, running on Node 19.6.

First I upgraded Node to v19.7, but that didn't make a difference.

After downgrading Node to v18.15.0 the app is working fine, using Nuxt 3.3.1. So I can confirm the suggested workaround

@erdemeren1234
Copy link

erdemeren1234 commented Mar 14, 2023

I have same problem.
node - 19.3.0
nuxt - 3.3.1

however, when i downgraded to node v18.15.0 , my app started to work

@hopkins385
Copy link

hopkins385 commented Mar 14, 2023

Same here on Mac with node v19.7.0, but I'm not using nuxt kit.

@danielroe danielroe changed the title The "name" argument must be specified Node v19 throws an error: 'The "name" argument must be specified' Mar 14, 2023
@MakFly
Copy link

MakFly commented Mar 14, 2023

i has a same error, downgrade the node version its ok

@hopkins385
Copy link

confirmed. with node v18.15.0 it is working fine.

@Tellarion
Copy link

Thanks. My project down. Nice fix downgrade solve -_-

Contributors fix for 19.7.0 win please.

@ilyasse-brachmi
Copy link

I solved the problem by adding in my package.json file:

"resolutions": {
"@nuxt/kit": "3.2.3"
}

@angelhdzmultimedia
Copy link
Contributor

Thanks for opening the issue!

Same error here on Node v19.0.0 and nuxt 3.3.1.

Reading all the comments now to see the definitive solution.

@angelhdzmultimedia
Copy link
Contributor

node v 19.1

force use @nuxt/kit in v3.2.3 in package.json

{
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "devDependencies": {
    "nuxt": "3.2.3",
    "@nuxt/kit": "3.2.3"
  }
}

@ postinstall /app
nuxt prepare

Nuxi 3.2.3 ✔ Types generated in .nuxt

devDependencies:

  • @nuxt/kit 3.2.3 (3.3.1 is available)

  • nuxt 3.3.1

  • nuxt 3.2.3 (3.3.1 is available)

Done in 43.4s

/app # node -v v19.1.0

Didn't work for me, sadly...

@ilyasse-brachmi
Copy link

@angelhdzmultimedia did u try this #19682 (comment) ?

@angelhdzmultimedia
Copy link
Contributor

angelhdzmultimedia commented Mar 14, 2023

@angelhdzmultimedia did u try this #19682 (comment) ?

Hold on. I tried changing Node to 18.11.0 and its working. Let me try your solution. Thanks!

Edit: Didn't work... :(

image

Confirming that I'm using Node v19.0.0 for the last test:

image

@imphil
Copy link

imphil commented Mar 14, 2023

Note: This problem is not Windows-only, I'm getting the same error on Linux with Node 19 (v19.7.0).

@nazar1ua
Copy link

Another workaround for now: vim node_modules/@nuxt/kit/dist/index.mjs and put any string in mark() method on line 168

@MartinX3
Copy link

@danielroe Nuxt 2 with bridge has the same error and nuxt-edge 2.16.3 doesn't fix it.

@danielroe
Copy link
Member

This is fixed in the edge channel for nuxi, not nuxt-edge.

@MartinX3
Copy link

MartinX3 commented Mar 16, 2023

Woops.
Since it happens while installing the packages how can I use nuxi-edge to installthe packages?
npx nuxi-edge@latest prepare doesn't work.

Edit:
I workarounded the npm install error by adding "@nuxt/kit": "3.2.3", to the devDependencies

Edit0:
Better workaround

    "pnpm": {
      "overrides": {
        "@nuxt/kit": "3.2.3"
      }
    },

@mansour161

This comment was marked as spam.

@ahmetbarut
Copy link

Greetings, downgrading node version to 18.15.0 fixed the problem

@wovasteenGova
Copy link

@ahmetbarut Not working. So I will be degrading nuxtJS. Will try again in a couple months.

@danielroe
Copy link
Member

@wovasteenGova This issue is caused by Node 19, and is already fixed on the edge channel. If downgrading to node 18 or trying the edge channel does not solve it for you, please open a new issue with details so we can look into it.

@wovasteenGova
Copy link

wovasteenGova commented Mar 18, 2023

@danielroe
OK, I will try again.
I tried to downgrade to node 18. However checking the version after attempting still showed v19.
Tried to force cleared cache. Didn't work.
Didn't want to bother with the EV.

Acknowledged that this is a NODE error not a NuxtJS

@bhishekprajapati
Copy link

0 Errors with node v18.15, Thanks!

@palachX
Copy link

palachX commented Mar 19, 2023

@danielroe OK, I will try again. I tried to downgrade to node 18. However checking the version after attempting still showed v19. Tried to force cleared cache. Didn't work. Didn't want to bother with the EV.

Acknowledged that this is a NODE error not a NuxtJS

Installing 18.15.0 solves all problems for versions starting from 3.3.0, It works on my host even on version 16.15

toreis-up added a commit to toreis-up/nuxt3-template that referenced this issue Mar 21, 2023
ci: Workaround to nuxt3.3 series errors caused by nodejs changes (nuxt/nuxt#19682)
toreis-up added a commit to toreis-up/nuxt3-template that referenced this issue Mar 21, 2023
ci: Workaround to nuxt3.3 series errors caused by nodejs changes (nuxt/nuxt#19682)
yuki-koma2 added a commit to yuki-koma2/sandbox-tools that referenced this issue Mar 24, 2023
node 19.6以降で発生するバグなのでどうしようもできない。大した影響もないのでバージョンを下げて対応。

nuxt/nuxt#19682
Flrande added a commit to toeverything/AFFiNE.pro that referenced this issue Apr 6, 2023
Flrande added a commit to toeverything/AFFiNE.pro that referenced this issue Apr 7, 2023
@jjaimealeman
Copy link

I too , can confirm. Downgrading node version from 20.0.0 to 18.12.0 solved this issue for me as well 👍

iainsproat added a commit to specklesystems/speckle-server that referenced this issue Dec 14, 2023
@iainsproat
Copy link

Same issue occurs with Node 20, can confirm that I worked around the issue by adding the following resolution:

"resolutions": {
    "@nuxt/kit": ">=3.2.3"
},

@shapedigital
Copy link

Just incase it helps anyone in the future.

We were still encountering this error when using Node 19, or 20+.
Blowing away the usual suspects did not help (yarn.lock, package-lock.json, node_modules) etc.

We were using nvs to switch Node versions.

Turns out the path is hardcoded in ~/.nuxtrc, and it was using the wrong one.

modules.0=/Users/xxxxxx/.nvm/versions/node/v18.11.0/lib/node_modules/@nuxt/devtools/module.cjs
By deleting this in ~/.nuxtrc we were able to get the project back up and running without this specific error.

Not sure why the path is referenced there globally, alongside things like 'telemetry'.
Feels like it should be project specific. 🤷

@CodeXiD
Copy link

CodeXiD commented Feb 20, 2024

Unfortunately I have the same problem now, still no solution ?

@MartinX3
Copy link

It works just fine in Nuxt 3 / Nuxt Bridge.

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

Successfully merging a pull request may close this issue.