-
Notifications
You must be signed in to change notification settings - Fork 23
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
Upgrade to nuxt 3 stable, remove histoire #75
Conversation
try Please make sure to go through the recent 3 releases and adapt our code to all changes that you can find. E.g., this change is a bit hidden as part of rc.12. To find it you have to see that:
|
I updated I went through the nuxt update logs and found this change to vitest: nuxt/framework#8325 Could this be the issue? |
ok so tbh my starting point would be: ditch the way we've written api tests until now and introduce https://v3.nuxtjs.org/getting-started/testing -> this is also a recent additon and would allow us to strip supertest, a lot of the hacky setup files, ... from this starter. Do you think you're up for the challenge? |
Ill take a shot at it right now! If I notice that I am struggling I will let you know in the morning and we should still have enough time to finish this PR! |
I've had a look at this. First I also tried leanly to use native-nuxt-testing, but this always failed with INVALID URL SCHEME, I had an approach to solve this by checking all used URIs, but this approach is indeterministic and may take some time. So I then switched to actually resolving the current problem without introducing big changes: That was easy -> the error is Tests are passing now 🎊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following does not work, please fix ASAP
❯ npm run build
> build
> nuxi build
Nuxi 3.0.0-rc.13 15:42:41
Nuxt 3.0.0-rc.13 with Nitro 0.6.1 15:42:41
ℹ Using default Tailwind CSS file from runtime/tailwind.css nuxt:tailwindcss 15:42:42
ℹ Client built in 3470ms 15:42:46
ℹ Building server... 15:42:46
✔ Server built in 2930ms 15:42:49
✔ Generated public .output/public nitro 15:42:49
ℹ Building Nitro Server (preset: node-server) nitro 15:42:49
WARN Multiple major versions of package supports-color are being externalized. Picking latest version: 15:42:52
+ /Users/nils/repos/sidebase/sidebase/node_modules/typeorm/node_modules/supports-color@7.2.0
- /Users/nils/repos/sidebase/sidebase/node_modules/supports-color@5.5.0
WARN Multiple major versions of package parse5 are being externalized. Picking latest version: 15:42:52
- /Users/nils/repos/sidebase/sidebase/node_modules/cli-highlight/node_modules/parse5@5.1.1
+ /Users/nils/repos/sidebase/sidebase/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5@6.0.1
WARN Multiple major versions of package parse5 are being externalized. Picking latest version: 15:42:52
+ /Users/nils/repos/sidebase/sidebase/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5@6.0.1
- /Users/nils/repos/sidebase/sidebase/node_modules/cli-highlight/node_modules/parse5@5.1.1
WARN Multiple major versions of package has-flag are being externalized. Picking latest version: 15:42:52
+ /Users/nils/repos/sidebase/sidebase/node_modules/typeorm/node_modules/has-flag@4.0.0
- /Users/nils/repos/sidebase/sidebase/node_modules/has-flag@3.0.0
WARN Multiple major versions of package semver are being externalized. Picking latest version: 15:42:52
+ /Users/nils/repos/sidebase/sidebase/node_modules/@mapbox/node-pre-gyp/node_modules/semver@7.3.8
- /Users/nils/repos/sidebase/sidebase/node_modules/semver@6.3.0
WARN Multiple major versions of package npmlog are being externalized. Picking latest version: 15:42:52
- /Users/nils/repos/sidebase/sidebase/node_modules/npmlog@5.0.1
+ /Users/nils/repos/sidebase/sidebase/node_modules/node-gyp/node_modules/npmlog@6.0.2
WARN Multiple major versions of package are-we-there-yet are being externalized. Picking latest version: 15:42:52
- /Users/nils/repos/sidebase/sidebase/node_modules/are-we-there-yet@2.0.0
+ /Users/nils/repos/sidebase/sidebase/node_modules/node-gyp/node_modules/are-we-there-yet@3.0.1
WARN Multiple major versions of package gauge are being externalized. Picking latest version: 15:42:52
- /Users/nils/repos/sidebase/sidebase/node_modules/gauge@3.0.2
+ /Users/nils/repos/sidebase/sidebase/node_modules/node-gyp/node_modules/gauge@4.0.4
✔ Nitro server built nitro 15:42:52
├─ .output/server/package.json (3.35 kB) (1.26 kB gzip)
├─ .output/server/index.mjs (572 B) (302 B gzip)
├─ .output/server/chunks/nitro/node-server.mjs.map (83.4 kB) (6.32 kB gzip)
├─ .output/server/chunks/nitro/node-server.mjs (25.6 kB) (7.55 kB gzip)
├─ .output/server/chunks/index.mjs.map (277 B) (192 B gzip)
├─ .output/server/chunks/index.mjs (693 B) (355 B gzip)
├─ .output/server/chunks/healthz.get.mjs.map (602 B) (320 B gzip)
├─ .output/server/chunks/healthz.get.mjs (997 B) (528 B gzip)
├─ .output/server/chunks/handlers/renderer.mjs.map (19.8 kB) (3.44 kB gzip)
├─ .output/server/chunks/handlers/renderer.mjs (15.9 kB) (4.91 kB gzip)
├─ .output/server/chunks/error-500.mjs.map (1.06 kB) (379 B gzip)
├─ .output/server/chunks/error-500.mjs (4.26 kB) (1.83 kB gzip)
├─ .output/server/chunks/app/styles.mjs.map (383 B) (217 B gzip)
├─ .output/server/chunks/app/styles.mjs (420 B) (243 B gzip)
├─ .output/server/chunks/app/server.mjs.map (45.8 kB) (6.97 kB gzip)
├─ .output/server/chunks/app/server.mjs (37.9 kB) (9.6 kB gzip)
├─ .output/server/chunks/app/client.manifest.mjs.map (2.49 kB) (486 B gzip)
├─ .output/server/chunks/app/client.manifest.mjs (3.37 kB) (612 B gzip)
├─ .output/server/chunks/app/_nuxt/index.208c0c95.mjs.map (269 kB) (44.1 kB gzip)
├─ .output/server/chunks/app/_nuxt/index.208c0c95.mjs (253 kB) (55.3 kB gzip)
├─ .output/server/chunks/app/_nuxt/error-component.e499347b.mjs.map (2.35 kB) (803 B gzip)
├─ .output/server/chunks/app/_nuxt/error-component.e499347b.mjs (2.01 kB) (894 B gzip)
├─ .output/server/chunks/app/_nuxt/error-500.5a83d237.mjs.map (1.7 kB) (613 B gzip)
├─ .output/server/chunks/app/_nuxt/error-500.5a83d237.mjs (3.32 kB) (1.46 kB gzip)
├─ .output/server/chunks/app/_nuxt/error-500-styles.ad145178.mjs.map (366 B) (224 B gzip)
├─ .output/server/chunks/app/_nuxt/error-500-styles.ad145178.mjs (2.22 kB) (864 B gzip)
├─ .output/server/chunks/app/_nuxt/error-404.1a84ca10.mjs.map (2.34 kB) (786 B gzip)
├─ .output/server/chunks/app/_nuxt/error-404.1a84ca10.mjs (4.17 kB) (1.75 kB gzip)
├─ .output/server/chunks/app/_nuxt/error-404-styles.3db9fdd2.mjs.map (366 B) (224 B gzip)
├─ .output/server/chunks/app/_nuxt/error-404-styles.3db9fdd2.mjs (3.92 kB) (1.25 kB gzip)
├─ .output/server/chunks/_id_.patch.mjs.map (717 B) (358 B gzip)
├─ .output/server/chunks/_id_.patch.mjs (1.08 kB) (507 B gzip)
├─ .output/server/chunks/_id_.get.mjs.map (540 B) (302 B gzip)
└─ .output/server/chunks/_id_.get.mjs (874 B) (448 B gzip)
Σ Total size: 13.7 MB (4.03 MB gzip)
✔ You can preview this build using node .output/server/index.mjs
❯ npm run start
> start
> NODE_ENV=production node .output/server/index.mjs
node:internal/modules/cjs/loader:353
const err = new Error(
^
Error: Cannot find module '/Users/nils/repos/sidebase/sidebase/.output/server/node_modules/parse5/lib/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:353:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/nils/repos/sidebase/sidebase/.output/server/node_modules/cli-highlight/dist/index.js:30:27)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
code: 'MODULE_NOT_FOUND',
path: '/Users/nils/repos/sidebase/sidebase/.output/server/node_modules/parse5/package.json',
requestPath: 'parse5'
}
one solution can be to install explicit versions of the problematic package (here: parse5). It would be nice to find a nicer solution / the actual cause for this though.
In the next iteration please make sure to test these commands yourzself to ensure that it works!
I tried installing |
I have also attempted to regenerate the |
This comment was marked as outdated.
This comment was marked as outdated.
Had a look into it for ~75 minutes. My conclusions: the error is coming either from nitro. The warning
And either unresolved or solved by So the problem boils down to:
The dirty workaround is proposed here: nuxt/nuxt#14761 – to basically manually fix invalid
One other think we can try, is to upgrade to RC14 which is not yet published but prepared in a branch in the hopes that it is fixed there. |
Maybe https://stackoverflow.com/a/74213192 will help nitro to properly build? |
I upgraded to the edge channel of RC14, but it sadly also did not resolve our issue 😢 |
I have also attempted to add this solution to our
Is this error easier to make sense of? For me it looks similar to the last one (in the sense of it not finsing specific files that should be included in the package. |
Then (it seems) the problem boils down to nitro not being able to build multiply versions of the packages. As it tries to still combine them together in one? Anyway, it seems like the path to resolve it is to:
Which can be impossible to solve depending on our packages. Also, maybe there are tools/npm commands to investigate or even resolve this kind of situations? |
Digging into this:
Here's the override:
This solution works for |
@BracketJohn the problem still seems to appear. I just followed the getting started guid and
|
adding
to the overrides section in package.json fixes it for me. |
Hey @djschilling - you're a saviour, thanks for reporting this -> weird how this slipped through 🤔 I've opened nuxt/bridge#277 to track this + nuxt/framework#79 to resolve this -> can you checkout whether the problem is fixed on nuxt/framework#79 for you? |
it ist fixed with this |
Perfect, thanks for reporting back @djschilling ❤️ |
Closes nuxt/framework#50
Contributes to nuxt/framework#65
The upgrade and removal of historie went successfully. However afterwards I have now run into the issue that the type
CompatibilityEvent
andCompatibilityEventHandler
do not exist within theh3
package. I did some googling about these types and also found no documentation on them. Any tips @BracketJohn?