question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RC.5] Identifier '$id_944007393' has already been declared

See original GitHub issue

Environment

Nuxt project info:                                                                                                                                                     21:44:45

------------------------------
- Operating System: `Darwin`
- Node Version:     `v18.2.0`
- Nuxt Version:     `3.0.0-rc.5`
- Package Manager:  `npm@8.9.0`
- Builder:          `vite`
- User Config:      `build`, `buildModules`, `modules`, `publicRuntimeConfig`, `privateRuntimeConfig`, `globalName`, `app`, `router`, `intlify`, `axios`, `proxy`, `auth`, `tailwindcss`, `googleFonts`
- Runtime Modules:  `@nuxtjs-alt/auth@1.1.20`, `@nuxtjs-alt/axios@1.0.12`, `@nuxtjs-alt/pinia@1.0.7`, `@nuxt/content@2.0.1`, `@nuxtjs/tailwindcss@5.3.0`
- Build Modules:    `@intlify/nuxt3@0.2.3`, `@nuxtjs-alt/google-fonts@1.0.5`
------------------------------

Reproduction

Run npm run dev

Describe the bug

After upgrading from rc4 to rc5, I am getting this error:

✔ Nitro built in 486 ms nitro 21:42:51 [nuxt] [request error] Identifier ‘$id_944007393’ has already been declared at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:117:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:361:14)
at async link (node:internal/modules/esm/module_job:70:21)

Followed by

<--- Last few GCs --->

[27327:0x140058000]    45253 ms: Mark-sweep (reduce) 4112.3 (4123.5) -> 4093.2 (4104.4) MB, 6.1 / 0.0 ms  (average mu = 0.882, current mu = 0.897) allocation failure; scavenge might not succeed
[27327:0x140058000]    45284 ms: Mark-sweep (reduce) 4112.3 (4123.6) -> 4112.3 (4123.6) MB, 5.8 / 0.0 ms  (average mu = 0.856, current mu = 0.814) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0x104d81d0c node::Abort() [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 2: 0x104d82d20 node::OnFatalError(char const*, char const*) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 3: 0x104edd608 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 4: 0x104edd584 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 5: 0x10504c438 v8::internal::TimedHistogramScope& v8::base::Optional<v8::internal::TimedHistogramScope>::emplace<v8::internal::TimedHistogram*&, v8::internal::Isolate*&>(v8::internal::TimedHistogram*&, v8::internal::Isolate*&) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 6: 0x10504b2e8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 7: 0x10504128c v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 8: 0x105041948 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
 9: 0x105026bf8 v8::internal::MaybeHandle<v8::internal::SeqOneByteString> v8::internal::FactoryBase<v8::internal::Factory>::NewRawStringWithMap<v8::internal::SeqOneByteString>(int, v8::internal::Map, v8::internal::AllocationType) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
10: 0x10526a4ec v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handle<v8::internal::ConsString>, v8::internal::AllocationType) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
11: 0x1052fceb4 v8::internal::RegExpImpl::IrregexpExec(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSRegExp>, v8::internal::Handle<v8::internal::String>, int, v8::internal::Handle<v8::internal::RegExpMatchInfo>, v8::internal::RegExp::ExecQuirks) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
12: 0x1052fca3c v8::internal::RegExp::Exec(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSRegExp>, v8::internal::Handle<v8::internal::String>, int, v8::internal::Handle<v8::internal::RegExpMatchInfo>, v8::internal::RegExp::ExecQuirks) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
13: 0x10531836c v8::internal::Runtime_RegExpExec(int, unsigned long*, v8::internal::Isolate*) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
14: 0x104bed5ac Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/opt/homebrew/Cellar/node/18.2.0/bin/node]
15: 0x104c47e9c Builtins_RegExpReplace [/opt/homebrew/Cellar/node/18.2.0/bin/node]
16: 0x104bdf250 Builtins_StringPrototypeReplace [/opt/homebrew/Cellar/node/18.2.0/bin/node]
17: 0xa00120614 
18: 0xa000f5bb4 
19: 0xa000f43e0 
20: 0x104c0c7b0 Builtins_ArrayMap [/opt/homebrew/Cellar/node/18.2.0/bin/node]
21: 0xa0010d36c 
22: 0xa0010d5a4 
23: 0xa001125bc 
24: 0xa0011605c 
25: 0x104ba9fb4 Builtins_AsyncFunctionAwaitRejectClosure [/opt/homebrew/Cellar/node/18.2.0/bin/node]
26: 0x104c395d8 Builtins_PromiseRejectReactionJob [/opt/homebrew/Cellar/node/18.2.0/bin/node]
27: 0x104b9bf10 Builtins_RunMicrotasks [/opt/homebrew/Cellar/node/18.2.0/bin/node]
28: 0x104b75544 Builtins_JSRunMicrotasksEntry [/opt/homebrew/Cellar/node/18.2.0/bin/node]
29: 0x104fe5138 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
30: 0x104fe5618 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
31: 0x105006980 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
32: 0x1050067ac v8::internal::MicrotaskQueue::PerformCheckpointInternal(v8::Isolate*) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
33: 0x104cb9ad0 node::InternalCallbackScope::Close() [/opt/homebrew/Cellar/node/18.2.0/bin/node]
34: 0x104d87880 node::fs::FileHandle::CloseReq::Resolve() [/opt/homebrew/Cellar/node/18.2.0/bin/node]
35: 0x104d88028 node::fs::FileHandle::ClosePromise()::$_0::__invoke(uv_fs_s*) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
36: 0x107263134 uv__work_done [/opt/homebrew/Cellar/libuv/1.44.1_1/lib/libuv.1.dylib]
37: 0x107266484 uv__async_io [/opt/homebrew/Cellar/libuv/1.44.1_1/lib/libuv.1.dylib]
38: 0x1072761dc uv__io_poll [/opt/homebrew/Cellar/libuv/1.44.1_1/lib/libuv.1.dylib]
39: 0x1072668d8 uv_run [/opt/homebrew/Cellar/libuv/1.44.1_1/lib/libuv.1.dylib]
40: 0x104cbac80 node::SpinEventLoop(node::Environment*) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
41: 0x104e1ebcc node::worker::Worker::Run() [/opt/homebrew/Cellar/node/18.2.0/bin/node]
42: 0x104e21040 node::worker::Worker::StartThread(v8::FunctionCallbackInfo<v8::Value> const&)::$_3::__invoke(void*) [/opt/homebrew/Cellar/node/18.2.0/bin/node]
43: 0x18a56c26c _pthread_start [/usr/lib/system/libsystem_pthread.dylib]
44: 0x18a56708c thread_start [/usr/lib/system/libsystem_pthread.dylib]
[1]    27314 abort      npm run dev

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

7reactions
pi0commented, Jul 14, 2022

Hash collision issue is fixed with ohash sub-dependency (https://github.com/unjs/ohash/pull/12)

Please remove workarounds, .nuxt and upgrade lockfile using:

npx nuxi@latest upgrade --force
3reactions
ahoiromancommented, Jul 13, 2022

This was caused by an import of

import "vue-toastification/dist/index.css";

in a plugin. Removing this and moving it to tailwind.css solved the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identifier has already been declared Error in JavaScript
The "Identifier has already been declared error" occurs when a variable with the same name has been declared multiple times in the same...
Read more >
javascript- Uncaught SyntaxError: Identifier * has already been ...
I am surprised to see this output as I am expecting 10 ..because two variables declared inside the if block refer to the...
Read more >
Identifier "x" has already been declared" - Ep 11 - YouTube
JS Casts 11 - How to fix "Uncaught SyntaxError: Identifier "x" has already been declared " in JavaScript.
Read more >
Uncaught SyntaxError: Identifier ''x" has already been declared
Hey there, I have combined some js code and suddenly my console is throwing this error: Uncaught SyntaxError: Identifier 'markers' has ...
Read more >
SyntaxError: Identifier has already been declared - Lightnetics
Full Error: SyntaxError: Identifier 'archivelog' has already been declared Action Performed: const fs = require('fs'); const archivelog = fs ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found