Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nitro): skip non existing externals #1876

Merged
merged 3 commits into from
Nov 15, 2021
Merged

fix(nitro): skip non existing externals #1876

merged 3 commits into from
Nov 15, 2021

Conversation

tobiasdiez
Copy link
Contributor

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Some packages don't have a package.json file in their root. For example, Prisma has the package.json in .prisma/client/package.json and not under .prisma. This leads to the following problem at the end of nuxt generate

 Nuxt Fatal Error                                                                                               β”‚
   β”‚                                                                                                                    β”‚
   β”‚   Error: ENOENT: no such file or directory, stat 'D:\Programming\JabRefOnline\node_modules\.prisma\package.json' 

This is fixed by silently ignore those packages (for prisma this is not a problem as .prisma/client is also imported, and thus the package.json file is still copied).

I wasn't sure about the coding style since the file uses an interesting mix of await/async and Promise.then.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Nov 12, 2021

βœ”οΈ Deploy Preview for nuxt3-docs ready!

πŸ”¨ Explore the source changes: fee8ed4

πŸ” Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/6192b03c69cad500082ea72b

😎 Browse the preview: https://deploy-preview-1876--nuxt3-docs.netlify.app

@tobiasdiez tobiasdiez mentioned this pull request Nov 12, 2021
38 tasks
@pi0 pi0 changed the title fix(nitro): Properly handle packages with no package.json fix(nitro): skip non existing externals Nov 15, 2021
@pi0 pi0 merged commit a7eacfe into nuxt:main Nov 15, 2021
@tobiasdiez tobiasdiez deleted the patch-1 branch November 15, 2021 19:50
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants