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

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

Closed
rvmourik opened this issue May 12, 2022 · 9 comments
Closed

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

rvmourik opened this issue May 12, 2022 · 9 comments

Comments

@rvmourik
Copy link

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/nuxt#13818 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

@HomWang
Copy link

HomWang commented May 12, 2022

Maybe you can use https://codesandbox.io

@danielroe danielroe transferred this issue from nuxt/framework May 12, 2022
@P4sca1
Copy link

P4sca1 commented May 12, 2022

Related (including a reproduction): #344

@Luferov
Copy link
Contributor

Luferov commented May 16, 2022

And if added “ufo” to transpile?

@rvmourik
Copy link
Author

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.

@dargmuesli
Copy link
Member

I guess a merge of nuxt/nuxt#10013 could help, which upgrade ufo to 0.8.4.

@rvmourik
Copy link
Author

I guess a merge of nuxt/nuxt.js#10013 could help, which upgrade ufo to 0.8.4.

I manually added it to a resolves in package.json and installed 0.8.4, for now that causes the error to be gone.

@gustawdaniel
Copy link

This can be connected:

nuxt/nuxt#13956

I prepared PR that updates only ufo but need a maintainer to approve running workflows:

nuxt/nuxt#10503

@P4sca1
Copy link

P4sca1 commented Jul 7, 2022

After upgrading my dependencies by refreshing the lock file, this issue is gone for me. Can you confirm?

@dargmuesli
Copy link
Member

I can confirm. @danielroe do your thing 😜❌

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

No branches or pull requests

7 participants