2.2.2
https://github.com/Sjoerrdd/tessa-app
Latest nativescript running on iOS 12
Create a new vue file
Paste this code (dialogs.alert() and alert() give the same error)
<template>
<Page>
<Label id="lbl" text="HOI" textWrap="true" />
</Page>
</template>
<script>
import axios from 'axios';
var dialogs = require("tns-core-modules/ui/dialogs");
export default {
mounted() {
dialogs.alert("Your message");
}
}
</script>
A popup should show up
An error:
ERROR in ../node_modules/debug/src/node.js
Module not found: Error: Can't resolve 'net' in '/Users/jackgeenen/Apps/TessaNS/node_modules/debug/src'
@ ../node_modules/debug/src/node.js 177:16-30
@ ../node_modules/debug/src/index.js
@ ../node_modules/follow-redirects/index.js
@ ../node_modules/axios/lib/adapters/http.js
@ ../node_modules/axios/lib/defaults.js
@ ../node_modules/axios/lib/axios.js
@ ../node_modules/axios/index.js
@ ../node_modules/babel-loader/lib!../node_modules/vue-loader/lib??vue-loader-options!./components/urenregistratie/Kalender.vue?vue&type=script&lang=js&
@ ./components/urenregistratie/Kalender.vue?vue&type=script&lang=js&
@ ./components/urenregistratie/Kalender.vue
@ ./main.js
The issue is axios. Import it from axios/dist/axios and it should work.
Solved
We are locking this issue because it has been closed for more than 14 days.
If the issue comes up again please open a new issue with additional details.
Most helpful comment
The issue is
axios. Import it fromaxios/dist/axiosand it should work.