I am using Ionic 2.
I am getting an error when I run:
ionic build android
Running 'build:before' gulp task before build [15:35:59] Starting 'clean'... [15:35:59] Finished 'clean' after 69 ms [15:35:59] Starting 'build'... [15:35:59] Starting 'sass'... [15:35:59] Starting 'html'... [15:35:59] Starting 'fonts'... [15:35:59] Starting 'scripts'... app\theme\app.variables.scss Error: File to import not found or unreadable: globals.core Parent style sheet: E:/Development/IDE/ionic-apps/theWhoZoo/app/theme/app.variables.scss on line 7 of app/theme/app.variables.scss >> @import "globals.core";
This a a file Ionic generated:
app.variables.scss
// http://ionicframework.com/docs/v2/theming/
// Ionic Shared Functions
// --------------------------------------------------
// Makes Ionic Sass functions available to your App
@import "globals.core";
// App Shared Variables
.
.
Any help is much appreciated.
Update
This happens when trying to use the v2 of ionic-native in your package.json. It took me some searching, but it is apparently normal since a lot changes with RC0 version of Ionic2. Read all about the new structure here.
Steps to mitigate the issue and truly convert your app to the latest Ionic2 structure:
npm -v)ionic -v)Follow all steps as described in the Github changelog and:
When all steps done, you can build your code with npm run build
Other errors I got:
templateUrl: 'build/pages/list/list.html' => templateUrl: 'list.html'"node_modules/.bin/ngc" - app, this will generate needed ts files in src/app/Visual Studio
I'm using Visual Studio, to make the build work you'll have to close VS once again and reopen and it will work fine. Also note that you'll need to add the path 'C:\Program Files (x86)\nodejs' to your external web tools at the top, so it won't take the builtin node.js which is too old.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With