Level 11
@dsim did you create Message.vue component file? it seems like it is not able to find that component. also, did you add this component in public/app.js file?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
So, when I'm trying to import Message I get this error:
Failed to compile.
./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
Module not found: Error: Can't resolve './components/Message.vue' in '/Users/user/Documents/Web Dev/my-app/src'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue 9:0-47
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
Not exactly sure what to do here.
<script>
import Message from './components/Message.vue';
export default {
name: 'app',
components: {
Message
},
data() {
return {}
}
}
</script>
<script>
export default {
name: "Message"
}
</script>
@dsim The path is wrong. So do you actually have a file at ./src/components/Message.vue? Because the error message is suggesting you don’t.
Please or to participate in this conversation.