You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vite5+vue3+ts Sending request error SyntaxError: The requested module '/node_modules/.vite/deps/axios.js?v=bc297318' does not provide an export named 'AxiosInstance'
#6343
Open
1079161148 opened this issue
Apr 6, 2024
· 1 comment
SyntaxError: The requested module '/node_modules/.vite/deps/axios.js?v=bc297318' does not provide an export named 'AxiosInstance'
[Vue Router warn]: Unexpected error when starting the router: SyntaxError: The requested module '/node_modules/.vite/deps/axios.js?v=bc297318' does not provide an export named 'AxiosInstance' (at request.ts:9:81)
Describe the bug
SyntaxError: The requested module '/node_modules/.vite/deps/axios.js?v=bc297318' does not provide an export named 'AxiosInstance'
<script setup lang="ts"> import { ref } from 'vue' import { getImageUrl } from '@/utils/index' import { userLogin, loginParams } from '@/api/login' const tel = ref('') const sms = ref('') const password = ref('') const showPassword = ref(false) const handleLogin = async () => { try { const params: loginParams = { phone: tel.value, password: password.value } let res = await userLogin(params) console.log(res, 'res') } catch (error) { console.log(error, 'handleLogin') } } ### To Reproduce _No response_ ### Code snippet _No response_ ### Expected behavior _No response_ ### Axios Version "axios": "^1.6.8", ### Adapter Version _No response_ ### Browser Version 123.0.6312.105 (official version) (64 bit) ### Browser Version _No response_ ### Node.js Version v18.12.0 ### OS _No response_ ### Additional Library Versions ```bash "@vueuse/core": "^10.9.0", "amfe-flexible": "^2.2.1", "axios": "^1.6.8", "crypto-js": "^4.2.0", "dayjs": "^1.11.10", "normalize.css": "^8.0.1", "nprogress": "^0.2.0", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "vant": "^4.8.8", "vue": "^3.4.21", "vue-router": "^4.3.0" ``` ### Additional context/Screenshots _No response_[Vue Router warn]: Unexpected error when starting the router: SyntaxError: The requested module '/node_modules/.vite/deps/axios.js?v=bc297318' does not provide an export named 'AxiosInstance' (at request.ts:9:81)
The text was updated successfully, but these errors were encountered: