ionic serve命令无法启动离子应用程序

时间:2017-01-15 10:11:41

标签: ionic-framework npm

我是离子框架的新手。我的计算机上安装了节点js 6.8.1。我试图创建一个离子项目。以下是我使用的命令:

npm install -g cordova

npm -install -g ionic

ionic start myapp blank

cd myapp

ionic serve

但每次我尝试最后一个命令时,都会显示以下错误消息:

  

无法找到ionic.config.json文件。你是一个离子项目吗?

我尝试了不同版本的节点多次。我该如何纠正?

1 个答案:

答案 0 :(得分:0)

离子启动yourAppName空白

  1. 转到您的应用项目文件夹并添加平台:例如:android或Ios使用以下命令。

    离子平台添加android

  2. 对于ios,如果你使用mac进行开发,那么......

    Exception in thread "main" org.apache.jena.riot.RiotException: [line: 25, col: 6 ] {E202} Cannot have both string data "Great white sharks are at the very top of the marine food chain. Feared as man-eaters, they are only responsible for about 5-10 attacks a year, which are rarely fatal. Great whites are ultimate predators. Powerful streamlined bodies and a mouth full of terrifyingly sharp, serrated teeth, combine with super senses that can detect a single drop of blood from over a mile away. Hiding from a great white isn't an option as they can detect and home in on small electrical discharges from hearts and gills. Unlike most other sharks, live young are born that immediately swim away.
    " and XML data <br> inside a property element. Maybe you want rdf:parseType='Literal'.
    
    1. 并键入:ionic platform add ios 要在浏览器中加载应用程序..要构建apk,请使用命令ionic serve --labionic build android

    2. 要在手机上的应用程序上运行,请使用USB连接线连接手机,并在手机上启用开发者选项。然后使用命令ionic build ios或ionic run ios在手机上安装应用程序(或iphone应用程序的iphone)。

    3. 要在模拟器上运行应用程序:ionic run android

    4.   

      请使用 - ionic启动而不是npm ...在你的代码中:)   希望这有帮助。一个小错字... :)

相关问题