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

Unable to start examples/essentials/hello-world example #2742

Open
DevDengChao opened this issue Aug 5, 2024 · 1 comment
Open

Unable to start examples/essentials/hello-world example #2742

DevDengChao opened this issue Aug 5, 2024 · 1 comment

Comments

@DevDengChao
Copy link
Contributor

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
Copy link
Contributor Author

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)

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

No branches or pull requests

1 participant