Skip to content

Instantly share code, notes, and snippets.

@M-erb
Created March 6, 2023 16:54
Show Gist options
  • Save M-erb/1a8e9da683c52a23815bed6c09645173 to your computer and use it in GitHub Desktop.
Save M-erb/1a8e9da683c52a23815bed6c09645173 to your computer and use it in GitHub Desktop.
vite "Uncaught SyntaxError: ambiguous indirect export"

package error in vite environment

"Uncaught SyntaxError: ambiguous indirect export"

I just wanted to take note of how I solved this with the yup package

I was getting the above error when importing like so:

import yup from 'yup'

Solved by importing using this:

import * as yup from 'yup'

I have not taken the time to look into why this error was happening but I assume it has to do with how yup the library is being exported and how vite is processing it.

Hope this helps some poor soul out there looking for answers!

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