Skip to content
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

After upgrading form v0.27.2 to v1.1.2 import error with Vite #5118

Closed
baracuda69 opened this issue Oct 13, 2022 · 2 comments · Fixed by #5162
Closed

After upgrading form v0.27.2 to v1.1.2 import error with Vite #5118

baracuda69 opened this issue Oct 13, 2022 · 2 comments · Fixed by #5162

Comments

@baracuda69
Copy link

Summary

In Vue3 / TypeScript project,
import { AxiosError } from 'axios';

Build shows warning:
Non-existent export 'AxiosError' is imported from node_modules/axios/index.js

Although there is only a build warning, any component (Vue) or TypeScript (ts) that includes this import fails to work.
Browser console (Dev-Tools) shows:

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/axios.js?v=3226fa61' does not provide an export named 'AxiosError' (at auth-store.ts:2:17)

Environment

  • Axios Version 1.1.2
  • Node.js Version v17.4.0
  • OS: Windows 10
  • Vite version: 3.1.7
@philBrown
Copy link

#5062

@richardtallent-erm
Copy link

richardtallent-erm commented Oct 13, 2022

Duplicate of #5031, possibly? I was having a similar issue with CanceledError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants