Closed fahim-arif closed 1 year ago
Thanks @fahim-arif for the report. We'll see what's going on here.
Just for a quick check, can you make sure you're on the latest version of UpChunk and also check the typescript version?
Hey @fahim-arif it looks like a typescript compatibility issue. The error is reffering to syntax we're using that was introduced in TS v4.5 (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#type-modifiers-on-import-names)
A couple of things you could try:
next@13.1.2
) From your screenshot, it looks like you're on the previous major version, which I believe has a somewhat out of date version of typescript. The latest should include typescript@4.9.4
on a fresh use of create next app (e.g. yarn create next-app
).typescript
you're using to the latest version (or anything >= 4.5 should work).With all of that said, I still am considering this an issue and planning a quick fix/release, since we can easily re-write the error-producing code in a way that would be compatible with versions as old as 3.8 (see: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export). Appreciate the feedback!
@fahim-arif just a quick update: I cut a patch release of @mux/upchunk@3.0.1
this morning, which should also fix your issue, but let us know if you try it out and you're still seeing the problem.
I upgraded to the latest version of @mux/upchunk@3.0.1 and the issue I had before is now fixed! Thanks you @cjpillsbury @dylanjha and everyone who helped fixing this issue in a such a short amount time.
I am trying to use Mux upload functionality and followed similar approach with Next.js Mux exmaple (https://github.com/vercel/next.js/tree/canary/examples/with-mux-video). Everything works fine on my local machine but when I try to build the project, I get a build error from node_modules/@mux/upchunk/dist/upchunk.d.ts:1:15 file.
Fyi, I am using node version: v18.12.1 and Next.js version 12