Visual Studio 2017 with ionic


#1

Hello,

Im new to ionic development i opened project at VS2017 with ionic template 2.0

I update the file package.json with ionic version 3.0 package.json

{
“name”: “myNewProject”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
"@angular/common": “5.0.3”,
"@angular/compiler": “5.0.3”,
"@angular/compiler-cli": “5.0.3”,
"@angular/core": “5.0.3”,
"@angular/forms": “5.0.3”,
"@angular/http": “5.0.3”,
"@angular/platform-browser": “5.0.3”,
"@angular/platform-browser-dynamic": “5.0.3”,
"@ionic-native/core": “4.4.0”,
"@ionic-native/splash-screen": “4.4.0”,
"@ionic-native/status-bar": “4.4.0”,
"@ionic/storage": “2.1.3”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“rxjs”: “5.5.2”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.18”
},
“devDependencies”: {
"@ionic/app-scripts": “3.1.6”,
“typescript”: “2.4.2”
},
“description”: “An Ionic project”
}

I get error in the task runner > Visual studio 2017

C:\Users\khalil\Documents\Visual Studio 2017\Projects\BlankCordovaApp5\BlankCordovaApp5> cmd.exe /c npm run clean --color=always

myNewProject@0.0.1 clean C:\Users\khalil\Documents\Visual Studio 2017\Projects\BlankCordovaApp5\BlankCordovaApp5
ionic-app-scripts clean
C:\Users\khalil\Documents\Visual Studio 2017\Projects\BlankCordovaApp5\BlankCordovaApp5\node_modules\node-sass\lib\binding.js:13
throw new Error(errors.unsupportedEnvironment());
^
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (59)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.5.3
at module.exports (C:\Users\khalil\Documents\Visual Studio 2017\Projects\BlankCordovaApp5\BlankCordovaApp5\node_modules\node-sass\lib\binding.js:13:13)
at Object. (C:\Users\khalil\Documents\Visual Studio 2017\Projects\BlankCordovaApp5\BlankCordovaApp5\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:660:30)
at Object.Module._extensions…js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\khalil\Documents\Visual Studio 2017\Projects\BlankCordovaApp5\BlankCordovaApp5\node_modules@ionic\app-scripts\dist\core\bundle-components.js:6:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myNewProject@0.0.1 clean: ionic-app-scripts clean
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myNewProject@0.0.1 clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\khalil\AppData\Roaming\npm-cache_logs\2017-12-21T11_34_51_852Z-debug.log

Process terminated with code 1.

What is the solution ?


#2

What is your ionic info output?


#3

How can i get it in VS2017!

This is from the git with path to project
info


#4

Ionic is not compatible with this Node version. Install the LTS as it says in the installation instructions.


#5

After i read the lts again and run the following lines at GIT
npm install -g cordova ionic
npm install @ionic/app-scripts@latest --save-dev
ionic start myApp tabs
info

Is it Correct ?


#6

Is that still true? The issue with Node 9 and npm was fixed just a day or two ago, with the new npm update (at least that’s what npm claims). I was thinking of upgrading to see if it works. Either way, it looks as though the OP didn’t pay attention to your advice


#7

Thnx a lot it is working.


#8

You can use Node 9.x with the latest Ionic app.-scripts release containing the latest node-sass release.


#9

Isn’t the use doing exactly that?

Node 9.3.0, app-scripts 3.1.6, but error message is:

Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (59)


#10

Okay I never tested it on Windows. I will ping Dan