Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Note: for build related issues you can open up an issue on the ionic-app-scripts repo
https://github.com/driftyco/ionic-app-scripts
Cannot type ionic serve without getting the following error
Seeing my code run in a browser
Steps to reproduce:
ionic serve
Running 'serve:before' npm script before serve
> ionic-hello-world@ watch /Users/Tassos/Dropbox/Code/LittleBrother
> ionic-app-scripts watch
sh: ionic-app-scripts: command not found
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "watch" "--color"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ionic-hello-world@ watch: `ionic-app-scripts watch`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ionic-hello-world@ watch script 'ionic-app-scripts watch'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Tassos/Dropbox/Code/LittleBrother/npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Post the output of ionic info below please
ionic info
--------------------------------
--------------------------------
Your system information:
Cordova CLI: 6.3.1
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.9.1
Xcode version: Xcode 8.0 Build version 8A218a
--------------------------------
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
******************************************************
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
I have similar issue. When i run "ionic serve" then everythink is ok. But when i run "ionic run android" it show me this error:
[09:09:28] Error: Error at /Users/Miri/Prace/Level/Mobile/apprc1/.tmp/pages/summary/summary.ngfactory.ts:1091:72
[09:09:28] Supplied parameters do not match any signature of call target.
[09:09:28] ngc failed
[09:09:28] ionic-app-script task: "build"
[09:09:28] Error: Error
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.8.1/bin/node" "/usr/local/bin/npm" "run" "build" "--color"
npm ERR! node v6.8.1
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Miri/Prace/Level/Mobile/apprc1/npm-debug.log
Caught exception:
undefined
Problem is in pipe "... | momentdt: 'LT'"
Same issue as #1562 please close it or mark it as duplicate....
@tlambrou i solve this by adding ionic-app-scripts to the project
npm install @ionic/app-scripts@latest --save-dev
Didn't solve the problem in my case....
It was @ionic/[email protected] and stayed the same...
In my case it appears that the problem was related to having my ionic app running in a folder that was synced to cloud services (Dropbox, iCloud). After moving the directory to a non-synced folder, things began working again. # #
@tlambrou That doesn't make sense.... Can you confirm that?
I have my project on a "non-synced folder" and tried to move it to another folder and didn't help...
This issue was moved to driftyco/ionic-app-scripts#256
ionic-hello-world@ build E:\apprc\mymap
ionic-app-scripts build
[21:48:18] ionic-app-scripts 0.0.36
[21:48:18] build prod started ...
[21:48:18] clean started ...
[21:48:18] clean finished in 12 ms
[21:48:18] copy started ...
[21:48:18] ngc started ...
[21:48:18] copy finished in 49 ms
[21:48:18] lint started ...
[21:48:22] lint finished in 3.66 s
[21:48:37] Error: Error at E:/apprc/mymap/.tmp/pages/contact/contact.ngfactory.ts:279:40
[21:48:37] Property 'mayarray' does not exist on type 'ContactPage'.
[21:48:37] ngc failed
[21:48:37] ionic-app-script task: "build"
[21:48:37] Error: Error
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build" "--color"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\apprc\mymap\npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
i made the newbie mistake of not realizing i was running another server on the same port i believe. so once i killed it it seemed to work just fine. Also it did make a difference to have the app out of the dropbox.
I had a similar issue, when I was trying to run : ionic serve OR sudo ionic serve
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 npm install -g cordova
Install ios-sim to deploy iOS applications.npm install -g ios-sim (may require sudo)
Install ios-deploy to deploy iOS applications to devices. npm install -g ios-deploy (may require sudo)
Unable to save ionic data: /Users/username/.ionic/ionic.config { Error: EACCES: permission denied, open '/Users/username/.ionic/ionic.config'
at Error (native)
at Object.fs.openSync (fs.js:641:18)
at Object.fs.writeFileSync (fs.js:1347:33)
at IonicStore.save (/usr/local/lib/node_modules/ionic/lib/utils/store.js:49:8)
at /usr/local/lib/node_modules/ionic/lib/cli.js:695:19
at _fulfilled (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/ionic/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:108:17)
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/Users/username/.ionic/ionic.config' }
ionic-hello-world@ ionic:serve /Users/username/Documents/Ionic/Project/MyProject
ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
/Users/username/Documents/Ionic/Project/MyProject/node_modules/node-sass/lib/binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding /Users/username/Documents/Ionic/Project/MyProject/node_modules/node-sass/vendor/darwin-x64-48/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 6.x
Found bindings for the following environments:
This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to build the binding for your current environment.
at module.exports (/Users/username/Documents/Ionic/Project/MyProject/node_modules/node-sass/lib/binding.js:15:13)
at Object.
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ ionic:serve: ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:serve 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! /Users/username/.npm/_logs/2017-04-28T07_28_59_330Z-debug.log
There was an error serving your Ionic application: There was an error with the spawned command: serve
I resolved it by doing this : sudo npm rebuild node-sass
Working now.
I hope it can help 馃憤
Most helpful comment
In my case it appears that the problem was related to having my ionic app running in a folder that was synced to cloud services (Dropbox, iCloud). After moving the directory to a non-synced folder, things began working again. # #