2016-11-18 18 views
1

私はちょうど新しいプロジェクトionic start blank --v2を作成していましたが、私はionic serveでした。エラー:ENOENT:そのようなファイルやディレクトリは、ionic2で開きません。

Error: ENOENT: no such file or directory, open '/home/panini/myApp/www/index.html'.

の下に、これはcmd

Running live reload server: http://localhost:35729 
Watching: www/**/*, !www/lib/**/*, !www/**/*.map 
√ Running dev server: http://localhost:8100 
Ionic server commands, enter: 
    restart or r to restart the client app from the root 
    goto or g and a url to have the app navigate to the given url 
    consolelogs or c to enable/disable console log output 
    serverlogs or s to enable/disable server log output 
    quit or q to shutdown the server and exit 

ionic $ 

ionic serveのための私の出力であるように私の閲覧に私は私のイオン性のいずれかの一気ファイルの時計を見つけるいけないエラーを取得していますここに私のパッケージがある

を果たします.jsonファイル

{ 
    "name": "ionic-hello-world", 
    "author": "Ionic Framework", 
    "homepage": "http://ionicframework.com/", 
    "private": true, 
    "scripts": { 
    "ionic:build": "ionic-app-scripts build", 
    "ionic:serve": "ionic-app-scripts serve" 
    }, 
    "dependencies": { 
    "@angular/common": "2.1.1", 
    "@angular/compiler": "2.1.1", 
    "@angular/compiler-cli": "2.1.1", 
    "@angular/core": "2.1.1", 
    "@angular/forms": "2.1.1", 
    "@angular/http": "2.1.1", 
    "@angular/platform-browser": "2.1.1", 
    "@angular/platform-browser-dynamic": "2.1.1", 
    "@angular/platform-server": "2.1.1", 
    "@ionic/storage": "1.1.6", 
    "ionic-angular": "2.0.0-rc.2", 
    "ionic-native": "2.2.3", 
    "ionicons": "3.0.0", 
    "rxjs": "5.0.0-beta.12", 
    "zone.js": "0.6.21" 
    }, 
    "devDependencies": { 
    "@ionic/app-scripts": "0.0.43", 
    "typescript": "2.0.6" 
    }, 
    "description": "myApp: An Ionic project", 
    "cordovaPlugins": [ 
    "cordova-plugin-device", 
    "cordova-plugin-console", 
    "cordova-plugin-whitelist", 
    "cordova-plugin-splashscreen", 
    "cordova-plugin-statusbar", 
    "ionic-plugin-keyboard" 
    ], 
    "cordovaPlatforms": [] 
} 

ここは私のイオン情報の結果です

Your system information: 

Cordova CLI: 6.3.0 
Ionic Framework Version: 2.0.0-rc.2 
Ionic CLI Version: 2.1.0 
Ionic App Lib Version: 2.1.0-beta.1 
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS 
Node Version: v6.0.0 

私はそれが働いているオブジェクトの下にこれを更新するときにpackage.jsonでこのhttps://github.com/driftyco/ionic-cli/issues/1420議論私のスクリプトオブジェクトが一致していないよると

"scripts": { 
"build": "ionic-app-scripts build", 
"watch": "ionic-app-scripts watch", 
"serve:before": "watch", 
"emulate:before": "build", 
"deploy:before": "build", 
"build:before": "build", 
"run:before": "build" 
} 

質問:

On giving ionic start myApp blank --v2 i am not able to generate package.json correctly.

http://blog.ionic.io/improvements-to-ionic-build-process/ according to this blog i tried still no better output.

答えて

3

私はubuntu16.04を使用していました。私は最新のものにインストールしている間、私の問題だったsudoコマンドbeforを追加するのを忘れました。

sudo npm install -g [email protected] 
sudo npm install @ionic/[email protected] 

今、すべては私もこれと同じ問題に直面していた

0

私は全く同じ問題を抱えています。私はこの

CMDイオン性情報に

Cordova CLI: 6.4.0 
Ionic CLI Version: 2.1.12 
Ionic App Lib Version: 2.1.7 
ios-deploy version: 1.9.0 
ios-sim version: 5.0.11 
OS: macOS Sierra 
Node Version: v6.9.1 
Xcode version: Xcode 8.1 Build version 8B62 

注ノードのバージョンを反映するために、イオン更新7.0

スタート新しいプロジェクトまたはタブおよびイオン-lまたはイオンが仕えるsidemenuではありませんうまくいくはずです。

0

正常に動作し、私はイオンフォーラムで検索する
https://github.com/ionic-team/ionic-cli/issues/1420 最後に私がthis-

ような何かを持っていることをrelizedようになりました

ここにindex.htmlファイルがありませんでした -

この問題を解決するにはインデックスファイルをコピーして貼り付けてください。

ここ10 コピー形式src/index.html
ペーストがうまくいけば、その意志はあなたのためのために、これは私のために働いたとして。コルドバのインストール中にノードの互換性のエラーを取得している場合

OR

行うための別の方法は、ちょうどこの記事
http://ionicframework.com/docs/intro/installation/

に従うことによって、あなたの地域の設定を更新しているそしてちょうどIT-に

$ sudo npm install n -g 
を行います

ノードバージョンを管理するためにnをインストールします。

$ sudo n latest 

ノードの最新バージョンをインストールします。

$ npm install -g ionic cordova 

コルドバをインストールします。
今すぐ作成新しいAPP-

$ ionic start cutePuppyPics 

実行サーバ -

$ cd cutePuppyPics 
$ ionic serve 

が、それはあまりにも役立つことを願っています...

関連する問題