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.

Cannot find package '/usr/src/app/.output/server/node_modules/ufo

See original GitHub issue

Environment


  • Operating System: Darwin
  • Node Version: v16.14.2
  • Nuxt Version: 2.16.0-27358576.777a4b7f
  • Package Manager: yarn@1.22.17
  • Builder: webpack
  • User Config: alias, head, css, plugins, components, buildModules, modules, router, auth, axios, build, runtimeConfig, bridge
  • Runtime Modules: -
  • Build Modules: nuxt-storm@1.1.3, nuxt-webfontloader@1.1.0, @nuxtjs/router-extras@1.1.1, @nuxtjs/axios@5.13.6, @nuxtjs/auth-next@5.0.0-1643791578.532b3d6, @nuxtjs/dotenv@1.4.1, @nuxtjs/universal-storage@0.5.9, nuxt-fontawesome@0.4.0, vue-scrollto/nuxt, @webstacknl/crud/nuxt@1.0.0-alpha.34, @nuxt/bridge@3.0.0-27530716.c4f8671

Reproduction

.

Describe the bug

If I run the nuxi preview command after building it, it produces the following error:

 Cannot find package '.output/server/node_modules/ufo/'

I saw this issue nuxt/framework#4585 with the same message but this is for Nuxt 3 and I am using Bridge for this project. I have deleted the .output/.nuxt/node_modules/yarn.lock and installed everything from scratch to see if that resolves the problem. Sadly it doesn’t.

As @pi0 asked in the related issue if the .output/server/node_modules directory exists, it does and there is also a folder with the name ufo with an index.cjs en index.mjs in it. However, the package.json is missing in the folder. Could that be the problem the import doesn’t work.

Also if I inspect the ./server/index.mjs in Webstorm, Webstorm can’t open the import 'ufo' line, but it can open the others like import 'unstorage'.

Hope you can help me out with this.

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dargmueslicommented, Jul 7, 2022

I can confirm. @danielroe do your thing 😜❌

1reaction
rvmourikcommented, May 16, 2022

And if added “ufo” to transpile?

nope, that doesn’t work. But I guess the missing package.json in the ufo folder is the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Go build: "Cannot find package" (even though GOPATH is set)
Even though I have GOPATH properly set, I still can't get "go build" or "go run" to find my own packages. What am...
Read more >
Cannot find package "." in - nix-community/gomod2nix - GitHub
Describe the bug gomod2nix seems to struggle with go dependencies that are part of the repo and referenced by relative paths.
Read more >
Cannot find package [SOLVED] - Getting Help - Go Forum
Hi! New with Go! My structure is: E: …GoWorkSpace …src …dp_project main.go controller.go …pkg …bin. The GOPATH is defined at: E:\GoWorkspace ...
Read more >
Solved: Cannot find module react : npm install - YouTube
Cannot find module '@angular-devkit/build-angular/ package.json'. Stack Equation. Stack Equation. •. •. 25K views 1 year ago ...
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