I’ve just tried to generate new ionic app ( i tried blank, sidenav and tabs ) but i’m getting really interesting error. This is my www folder after running ionic serve command
If you noticed there is no index.html. It is ndex.html (there is no ‘i’ ) so i’m getting this error ;
var contentStr = content.toString();
^
TypeError: Cannot read property ‘toString’ of undefined
at Object.injectLiveReloadScript (E:\Coding\İonic\cutePuppyPics\node_modules@ionic\app-scripts\dist\dev-server\live-reload.js:28:29)
at ReadFileContext.callback (E:\Coding\İonic\cutePuppyPics\node_modules@ionic\app-scripts\dist\dev-server\http-server.js:69:39)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:358:13)
I tried this but it didnt solve my problem.;
If i rename ndex.html to index.html this error gets fixed but i get another error;
[INFO] Starting app-scripts server: --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address 0.0.0.0 - Ctrl+C to cancel
[04:03:14] watch started …
[04:03:14] build dev started …
[04:03:14] clean started …
[04:03:14] clean finished in 4 ms
[04:03:14] copy started …
[04:03:14] transpile started …
[04:03:16] transpile finished in 2.33 s
[04:03:16] preprocess started …
[04:03:16] deeplinks started …
[04:03:16] deeplinks finished in 18 ms
[04:03:16] preprocess finished in 19 ms
[04:03:16] webpack started …
[04:03:16] copy finished in 2.49 s
[04:03:22] webpack finished in 6.22 s
[04:03:22] sass started …
[04:03:23] sass finished in 826 ms
[04:03:23] postprocess started …
[04:03:23] postprocess finished in 5 ms
[04:03:23] lint started …
[04:03:23] build dev finished in 9.44 s
[04:03:25] lint finished in 1.92 s
[04:03:26] dev server running: http://localhost:8100/
What command are you running to build the app?
Add --verbose at the end of that command and show us the output.
Also show us the output of ionic info please.
Node : v7.7.0
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
PS E:\Coding\İonic\testApp> ionic serve --verbose
[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for global @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
[DEBUG] Getting plugin info for ionic
[DEBUG] Getting plugin info for @ionic/cli-plugin-ionic-angular
[DEBUG] Checking for latest plugin version of ionic@latest.
[DEBUG] Checking for latest plugin version of @ionic/cli-plugin-ionic-angular@latest.
[DEBUG] Latest version of ionic@latest is 3.3.0.
[DEBUG] Latest version of @ionic/cli-plugin-ionic-angular@latest is 1.3.0.
[INFO] Starting app-scripts server: --log-level debug --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address 0.0.0.0 - Ctrl+C to cancel
[15:50:44] watch started …
[15:50:44] build dev started …
[15:50:44] clean started …
[15:50:44] clean finished in 40 ms
[15:50:44] copy started …
[15:50:44] transpile started …
[15:50:52] transpile finished in 7.32 s
[15:50:52] preprocess started …
[15:50:52] deeplinks started …
[15:50:52] deeplinks finished in 7 ms
[15:50:52] preprocess finished in 8 ms
[15:50:52] webpack started …
[15:50:52] copy finished in 8.23 s
[15:51:00] webpack finished in 8.75 s
[15:51:00] sass started …
[15:51:02] sass finished in 2.03 s
[15:51:02] postprocess started …
[15:51:02] postprocess finished in 24 ms
[15:51:02] lint started …
[15:51:02] build dev finished in 18.23 s
[15:51:05] lint finished in 2.34 s
[15:51:05] dev server running: http://localhost:8100/
Error: Cannot find module ‘E:\Coding\İonic\testApp\node_modules.bin..@ionic\app-scripts\bin\ionic-app-scripts.js’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! testApp@0.0.1 ionic:serve: ionic-app-scripts serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the testApp@0.0.1 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! C:\Users\omerf\AppData\Roaming\npm-cache_logs\2017-06-11T13_44_17_634Z-debug.log
PS E:\Coding\İonic\testApp> nvm use 6.11
6.11.0
Now using node v6.11.0 (64-bit)
PS E:\Coding\İonic\testApp> ionic serve
Error: Missing binding E:\Coding\İonic\testApp\node_modules\node-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x
Found bindings for the following environments:
Windows 64-bit with Node.js 7.x
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.
I runned npm rebuild node-saas but nothing changed.
Could you please open an issue at https://github.com/ionic-team/ionic-cli/issues about this? I don’t think this should stay this way. (Post the link here when you did so I can track it too)