Emile Cantero
Emile Cantero

Reputation: 2053

Ionic 2 Error: TypeError: AppScripts.serve is not a function

I am working on a Ionic 2 project using angular to do a very small app.. when I run a ionic serve I got this, I already tried to deleted completely the node modules folder and run a npm intallaccording to Wouter help..it look like there an issue with @angular/appscripts and I already tried this post Ionic 2 Permission Denied on OSX

I think it should be something with the dependencies..if anyone got an idea..thanks in advance

When I run ìonic serve` this:

  Starting app-scripts server: --address 0.0.0.0 --port 8100 --
livereload-port 35729 --dev-logger-port 53703 --nobrowser -
Ctrl+C to cancel
TypeError: AppScripts.serve is not a function
at /usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-
utils/lib/ionic-angular/serve.js:18:43
at next (native)
at fulfilled 
(/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:104:62)

Here's my package.json:

{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
  "clean": "ionic-app-scripts clean",
  "build": "ionic-app-scripts build",
  "ionic:build": "ionic-app-scripts build",
  "ionic:serve": "ionic-app-scripts serve"
  },
"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic/storage": "1.1.7",
"ionic-angular": "2.0.1",
"ionic-native": "2.4.1",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"sw-toolbox": "3.4.0",
"zone.js": "0.6.26"
  },
"devDependencies": {
"@ionic/app-scripts": "1.0.0",
"typescript": "2.0.9"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [
   "ios",
    {
     "platform": "ios",
     "version": "",
     "locator": "ios"
   }
 ],
 "description": "my-places: An Ionic project"
}

Upvotes: 1

Views: 523

Answers (1)

Emile Cantero
Emile Cantero

Reputation: 2053

I found the solution here Ionic Cli Github running this command npm install --save-dev @ionic/app-scripts@latest

Upvotes: 2

Related Questions