Ionic-app-scripts: Ionic start creates missing charactered file and ionic serve doesn't work

Created on 11 Jun 2017  Â·  6Comments  Â·  Source: ionic-team/ionic-app-scripts

Short description of the problem:

I created a blank and tabs app with 'ionic start appname' but i couldn't serve it with ionic serve. Because inside www folder it created index.html as ndex.html. Letter 'i' is missing. Like this;

Directory: E:\Coding\İonic\testApp\www

Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 11.06.2017 01:09 assets
d----- 11.06.2017 01:09 build
-a---- 11.06.2017 01:01 0 .gitkeep
-a---- 11.06.2017 01:09 266 anifest.json
-a---- 11.06.2017 01:09 715 ervice-worker.js
-a---- 11.06.2017 01:01 207 manifest.json
-a---- 11.06.2017 01:09 1276 ndex.html
-a---- 11.06.2017 01:01 168 service-worker.js

So i'm getting this error

E:\Coding\İonic\testApp\node_modules\@ionic\app-scripts\dist\dev-server\live-reload.js:28
var contentStr = content.toString();
^

TypeError: Cannot read property 'toString' of undefined

Because of it cant find index.html. After i fix it manually and run 'ionic serve' i got this error which i haven't figure it out yet ;

app-scripts serve unexpectedly failed.settings: undefinedcontext: [object Object]

Steps to reproduce:
https://ionicframework.com/getting-started/

Same steps here.

Which @ionic/app-scripts version are you using?

"ionic/app-scripts": "1.3.7", // Removed [at] properly

Am i missing something or is this a bug?

Most helpful comment

Problem seems to have been the special character İ instead of I in the path.

All 6 comments

Path causes this error. When i remove E:\Coding\İonic... big i inside path ( İ ) it solved my problem.

Problem seems to have been the special character İ instead of I in the path.

@danbucholtz Not able to reproduce on MacOS--seems to be a windows issue

@0m3rF,

Sorry, I can't recreate. Can you provide instructions on how to do so.

Thanks,
Dan

@danbucholtz create new project with ionic start in directory something like this : C:İonicProjects that was all i did. After running ionic serve it throws some error

I can reproduce this on Windows.

  1. Create folder with strange name
    2.
PS C:\Users\Jan\Documents> cd .\İonic\
PS C:\Users\Jan\Documents\İonic> ionic start blank2 blank
✔ Creating directory .\blank2 - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
✔ Downloading - done!
[INFO] Fetching starter template blank (https://github.com/ionic-team/ionic2-starter-blank/archive/master.tar.gz)
✔ Downloading - done!
✔ Updating package.json with app details - done!
✔ Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!
> npm install
✔ Running command - done!
> npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest
✔ Running command - done!
> git init
✔ Running command - done!
> git add -A
✔ Running command - done!
> git commit -m "Initial commit" --no-gpg-sign
✔ Running command - done!

♬ ♫ ♬ ♫  Your Ionic app is ready to go! ♬ ♫ ♬ ♫

Run your app in the browser (great for initial development):
  ionic serve

Run on a device or simulator:
  ionic cordova run ios

Test and share your app on a device with the Ionic View app:
  http://view.ionic.io

? Link this app to your Ionic Dashboard to use tools like Ionic View? No

Go to your newly created project: cd .\blank2
PS C:\Users\Jan\Documents\İonic> cd .\blank2\
PS C:\Users\Jan\Documents\İonic\blank2> ionic start
? You are already in an Ionic project directory. Do you really want to start another project here? No
[OK] Not starting project within existing project.
PS C:\Users\Jan\Documents\İonic\blank2> ionic serve
[INFO] Starting app-scripts server: --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address 0.0.0.0 - Ctrl+C to
       cancel
[23:18:20]  watch started ...
[23:18:20]  build dev started ...
[23:18:20]  clean started ...
[23:18:20]  clean finished in 3 ms
[23:18:20]  copy started ...
[23:18:20]  transpile started ...
[23:18:24]  transpile finished in 4.27 s
[23:18:24]  preprocess started ...
[23:18:24]  deeplinks started ...
[23:18:24]  deeplinks finished in 22 ms
[23:18:24]  preprocess finished in 29 ms
[23:18:24]  webpack started ...
[23:18:25]  copy finished in 4.77 s
[23:18:40]  webpack finished in 15.14 s
[23:18:40]  sass started ...
[23:18:42]  sass finished in 1.98 s
[23:18:42]  postprocess started ...
[23:18:42]  dev server running: http://localhost:8100/

[INFO] Development server running
       Local: http://localhost:8100

C:\Users\Jan\Documents\İonic\blank2\node_modules\@ionic\app-scripts\dist\dev-server\live-reload.js:28
    var contentStr = content.toString();
                            ^

TypeError: Cannot read property 'toString' of undefined
    at Object.injectLiveReloadScript (C:\Users\Jan\Documents\İonic\blank2\node_modules\@ionic\app-scripts\dist\dev-serve
r\live-reload.js:28:29)
    at ReadFileContext.callback (C:\Users\Jan\Documents\İonic\blank2\node_modules\@ionic\app-scripts\dist\dev-server\htt
p-server.js:70:39)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)
PS C:\Users\Jan\Documents\İonic\blank2>
  1. It is not only index.html that has a broken file name, but many others as well:
PS C:\Users\Jan\Documents\İonic\blank2\www> tree /F
C:.
│   .gitkeep
│   anifest.json
│   ervice-worker.js
│   manifest.json
│   ndex.html
│   service-worker.js
│
├───assets
│   ├───│   └───fonts
│           oboto-bold.ttf
│           oboto-bold.woff
│           oboto-bold.woff2
│           oboto-light.ttf
│           oboto-light.woff
│           oboto-light.woff2
│           oboto-medium.ttf
│           oboto-medium.woff
│           oboto-medium.woff2
│           oboto-regular.ttf
│           oboto-regular.woff
│           oboto-regular.woff2
│           oboto.scss
│           onicons.eot
│           onicons.scss
│           onicons.svg
│           onicons.ttf
│           onicons.woff
│           onicons.woff2
│           oto-sans-bold.ttf
│           oto-sans-bold.woff
│           oto-sans-regular.ttf
│           oto-sans-regular.woff
│           oto-sans.scss
│
└───build
        main.css
        main.css.map
        main.js
        main.js.map
        olyfills.js
        w-toolbox.js

ionic info is:

global packages:

@ionic/cli-utils : 1.4.0
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.11
@ionic/cli-plugin-ionic-angular : 1.3.1
Ionic Framework                 : ionic-angular 3.5.0

System:

Node       : v7.9.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 4.2.0
Was this page helpful?
0 / 5 - 0 ratings