content icon indicating copy to clipboard operation
content copied to clipboard

Unable to start examples/essentials/hello-world example

Open DevDengChao opened this issue 1 year ago • 3 comments

Environment

Nuxt project info: 2024-08-05


  • Operating System: Windows_NT
  • Node Version: v18.20.3
  • Nuxt Version: 3.12.4
  • CLI Version: 3.12.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

Run yarn dev

Describe the bug

Unable to start the nuxt dev server.

Additional context

I'm facing the "Document not found" issue, so I try to figure out will it happen with the official example, then I found the example is not working.

Logs

> nuxt dev

Nuxt 3.12.4 with Nitro 2.9.7                                                                                                                                                                                              11:48:47
                                                                                                                                                                                                                          11:48:47
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

i Nuxt Icon server bundle mode is set to local                                                                                                                                                                            11:48:51

 WARN  Slow module @nuxt/icon took 9933.87ms to setup.                                                                                                                                                                    11:49:00

i Using default Tailwind CSS file                                                                                                                                                                        nuxt:tailwindcss 11:49:02

 WARN  Slow module @nuxt/ui took 11776.22ms to setup.                                                                                                                                                                     11:49:02

  ➜ DevTools: press Shift + Alt + D in the browser (v1.3.9)                                                                                                                                                               11:49:03

i Tailwind Viewer: http://localhost:3000/_tailwind/                                                                                                                                                      nuxt:tailwindcss 11:49:04
i Re-optimizing dependencies because vite config has changed                                                                                                                                                              11:49:06
√ Vite client built in 182ms                                                                                                                                                                                              11:49:06
√ Vite server built in 1180ms                                                                                                                                                                                             11:49:07
√ Nuxt Nitro server built in 3116 ms                                                                                                                                                                                nitro 11:49:10
[11:49:10] i Nuxt now supports pinning the behavior of provider and deployment presets with a compatibility date. We recommend you specify a compatibilityDate in your nuxt.config file, or set an environment variable, such as COMPATIBILITY_DATE=2024-08-05.

> Do you want to update your nuxt.config to set compatibilityDate: '2024-08-05'?
> Yes /   No


 ERROR  [worker reload] [worker init] Cannot find package '@iconify/utils' imported from D:\workspace\open-source\nodejs\nuxt\content\examples\essentials\hello-world\.nuxt\dev\index.mjs                                 11:49:14  
Did you mean to import @[email protected]/node_modules/@iconify/utils/lib/index.cjs?

  Did you mean to import @[email protected]/node_modules/@iconify/utils/lib/index.cjs?
  at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
  at new NodeError (node:internal/errors:405:5)
  at packageResolve (node:internal/modules/esm/resolve:916:9)
  at moduleResolve (node:internal/modules/esm/resolve:973:20)
  at defaultResolve (node:internal/modules/esm/resolve:1193:11)
  at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
  at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
  at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
  at link (node:internal/modules/esm/module_job:75:36)

i Vite client warmed up in 5155ms                                                                                                                                                                                         11:49:16  
i Vite server warmed up in 7959ms                                                                                                                                                                                         11:49:18

DevDengChao avatar Aug 05 '24 03:08 DevDengChao

After I added @iconify/utils to devDependencies, another error comes out:

[13:46:41]  ERROR  [worker reload] [worker init] Package import specifier "#internal/nitro/virtual/app-config" is not defined in 
package D:\workspace\open-source\nodejs\nuxt\content\node_modules\.pnpm\[email protected][email protected]\node_modules\nitropack\package.json 
imported from D:\workspace\open-source\nodejs\nuxt\content\node_modules\.pnpm\[email protected][email protected]\node_modules\nitropack\dist\runtime\config.mjs

  at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
  at new NodeError (node:internal/errors:405:5)
  at importNotDefined (node:internal/modules/esm/resolve:353:10)
  at packageImportsResolve (node:internal/modules/esm/resolve:803:9)
  at moduleResolve (node:internal/modules/esm/resolve:967:16)
  at defaultResolve (node:internal/modules/esm/resolve:1193:11)
  at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
  at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
  at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
  at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
  at link (node:internal/modules/esm/module_job:75:36)

DevDengChao avatar Aug 05 '24 05:08 DevDengChao

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Oct 05 '24 02:10 github-actions[bot]

Hello ?

DevDengChao avatar Oct 06 '24 12:10 DevDengChao

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Dec 06 '24 02:12 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity.

github-actions[bot] avatar Jan 16 '25 15:01 github-actions[bot]