我在我的 vuejs webApp 中遇到了这个错误,希望有人告诉我如何解决它:
./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?
type=script&index=0!./src/components/Envio.vue
Module not found: Error: Can't resolve './firebase' in
'C:\Users\#####\Desktop\#####\src\components'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?
type=script&index=0!./src/components/Envio.vue 17:0-32
@ ./src/components/Envio.vue
@ ./src/routes.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-
server ./src/main.js
这是我的 vue 文件中的脚本:
<script>
import { db } from './firebase'
export default {
data: {
mensaje: null,
... }
}
</script>