Ionic do not work with ion2

I started a clean project using ionic2 based on a tab pattern by following these steps:

$ ionic start <myapp> --v2
$ cd <myapp>
$ ionic serve

Then the conclusion from is ionic servetrue:

> ionic-hello-world@ ionic:serve /home/luan/<myapp>
> ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"

If I try to open localhost:8100, there will be no answer.

The files and project code are the same as the tab template, but it just doesn't win. Can anybody help?

UPDATE: My ionic info

My system information:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.2.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.10.0
Xcode version: Not installed
+4
source share
3 answers

I have found the answer. It turns out that there was a problem with the version of Ion App Scripts (app-scripts) scripts 1.2.2. Just downgraded to 1.1.4and works great. Actual workaround:

in package.json, change

"@ionic/app-scripts": "1.2.2" 

to

"@ionic/app-scripts": "1.1.4"

npm install . - :

[...]
- sentence-case@2.1.1 node_modules/sentence-case
- change-case@3.0.1 node_modules/change-case
ionic-hello-world@ /home/luan/Projetos/prestacontas
└── @ionic/app-scripts@1.1.4 ## The problem was here

shure, @ionic/app-scripts 1.1.4, 1.2.2.

.

+3

npm :

+7

, Ionic. , :

ionic serve --address localhost

"@ionic/app- script": "1.2.2" , localhost 0.0.0.0. , .

"devDependencies": {      "@ionic/app-scripts": "1.2.2",

, , - :

timeStamp.getDate Stack TypeError: timeStamp.getDate     at HomePage.timeSince(http://localhost:8100/build/main.js:70141:33)      SafeSubscriber._next (http://localhost:8100/build/main.js:70088:42)      SafeSubscriber.__ tryOrUnsub (http://localhost:8100/build/main.js:69844:16)      SafeSubscriber.next(http://localhost:8100/build/main.js:69793:22)      Subscriber._next (http://localhost:8100/build/main.js:69746:26)      Subscriber.next(http://localhost:8100/build/main.js:69710:18)      XMLHttpRequest.onLoad(http://localhost:8100/build/main.js:44518:38)      t.invokeTask(http://localhost:8100/build/polyfills.js:3:14051)      Object.onInvokeTask(http://localhost:8100/build/main.js:27788:37)      t.invokeTask(http://localhost:8100/build/polyfills.js:3:13987) Ionic Framework: 2.0.0-rc.2 Ionic Native: 2.2.3 : 1.2.2 Angular Core: 2.1.1 Angular CLI: 2.1.1 Node: 6.9.1 : Windows 10 : Win32: Mozilla/5.0 (Windows NT 10.0, Win64, x64) AppleWebKit/537.36 (KHTML, Gecko) Chrome/56.0.2924.87 Safari/537.36

, Chrome, , .

0

Source: https://habr.com/ru/post/1673430/


All Articles