-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
build fails when using vercel adapter (no not the same as the other ticket) #3104
Comments
i'm having a similar issue with a shared models library, everything in it seems to be imported correctly except a single enum, which SvelteKit thinks is not exported. this isn't a problem in my backend API project, which uses the same shared library and imports the same things. |
I import the same library in different components in the same project and
no issues with the import. The only two files where this import breaks is
the stateMachine.ts files
Sincerely,
Justin Sunseri
…On Sat, Dec 25, 2021 at 2:57 AM Alyx Mote ***@***.***> wrote:
i'm having a similar issue with a shared models library, everything in it
seems to be imported correctly except a single enum, which SvelteKit thinks
is not exported. this isn't a problem in my backend API project, which uses
the same shared library and imports the same things.
—
Reply to this email directly, view it on GitHub
<#3104 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEPF56GQSF6RQOEFCHS6LUSS7CZANCNFSM5KW2G5TQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm sorry, but the reproduction isn't optional. I'm happy to take a look at this if there's a way to reproduce on my machine |
You don't have to close a legitimate issue without at least asking me and giving me a day to come up with a reproduction. What the best way to provide a repro for a build issue that only pops up on a specific adapter? is there a REPL that will support this case? |
@benmccann I tried to reproduce on a project from scratch but was unable to. I just granted you access to my private repo. You should be able to pull down the 'build-issue' branch and run yarn build to see the issue. |
I can't build your project because it's saying
Hopefully that library will fix its packaging at some point. There seems to be a PR pending that says it fixes some things to allow it to work on SvelteKit: statelyai/xstate#2474. Perhaps you can ping that PR and see if it can be merged |
Why does it work locally using the auto adapter but fails with vercel
adapter? Keep in mind this isn't only an xstate issue. I've seen other
similar reports with different libraries. Let me fix the supabase url
issue for you.
…On Mon, Dec 27, 2021, 1:58 PM Ben McCann ***@***.***> wrote:
I can't build your project because it's saying supabaseUrl is required.
But anyway, I'm guessing there might not be a lot we can do because the
entire xstate packaging situation seems like a mess:
- statelyai/xstate#2893
<statelyai/xstate#2893>
- statelyai/xstate#2642
<statelyai/xstate#2642>
- statelyai/xstate#2458
<statelyai/xstate#2458>
Hopefully that library will fix its packaging at some point. There seems
to be a PR pending that says it fixes some things to allow it to work on
SvelteKit: statelyai/xstate#2474
<statelyai/xstate#2474>. Perhaps you can ping
that PR and see if it can be merged
—
Reply to this email directly, view it on GitHub
<#3104 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEPF5B3OSVHUHJPQLQZ33US757LANCNFSM5KW2G5TQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The auto adapter isn't actually running the whole build process. If you tried to build using the auto adapter on Vercel it would detect that platform and fail in the same way. But if you try to build locally with the auto adapter then it doesn't know you want to build for Vercel and so it doesn't complete the build and gives you the warning:
|
I have fixed the repo so that it should have some dummy information for the supabase config so you should get past that. I would also like to note that the library that is actually being complained about was '@xstate/svelte' not 'xstate' |
I still think the best solution is to try to get statelyai/xstate#2474 merged |
Describe the bug
I'm creating a state machine use xstate and my someMachine.ts file does
import { useMachine } from '@xstate/svelte';
works fine locally using adapter-auto but switching to adapter-vercel causes the build to fail saying
'lib.useMachine is not a function'
changing import statement to
import { useMachine } from '@xstate/svelte/lib/useMachine';
resolves the issue;
Reproduction
none at this time
Logs
No response
System Info
Severity
annoyance
Additional Information
thank you for your time
The text was updated successfully, but these errors were encountered: