2017-01-10 10 views
1

が存在する場所Ionic2は、JSファイルを探して、私は次のエラーを取得する:あなたが見ることができるように、それはjsファイルを探しているTSファイルは、私はイオン2使用しています

Error: Module build failed: Error: ENOENT: no such file or directory, open 

'E:\Development\IDE\ionic-apps\theWhoZoo-chat\src\pages\model\mapRangeModel.js' at Error (native)

。しかし、それは明らかにsrcフォルダの下には存在しません。それに相当するファイルはtsです。

は、このファイルが存在しない、つまり:

\src\pages\model\mapRangeModel.ts 

build\main.jsから:

/***/ function(module, exports) { 

throw new Error("Module build failed: Error: ENOENT: no such file or directory, open 'E:\\Development\\IDE\\ionic-apps\\theWhoZoo-chat\\src\\pages\\model\\mapRangeModel.js'\n at Error (native)"); 

/***/ }, 

さらに詳しい情報:私はionic serveを実行したときに、私はまた私のCLIで次のエラーを取得しています

[12:26:34] watch failed: A watch configured to watch the following paths failed to start. It likely that a file 
      referenced does not exist: E:\Development\IDE\ionic-apps\theWhoZoo-chat\src\assets\**\*, 
      E:\Development\IDE\ionic-apps\theWhoZoo-chat\src\index.html, 
      E:\Development\IDE\ionic-apps\theWhoZoo-chat\src\manifest.json, 
      E:\Development\IDE\ionic-apps\theWhoZoo-chat\src\service-worker.js, 
      E:\Development\IDE\ionic-apps\theWhoZoo-chat\node_modules\ionicons\dist\fonts\**\*, 
      E:\Development\IDE\ionic-apps\theWhoZoo-chat\node_modules\ionic-angular\fonts\**\*, 
      E:\Development\IDE\ionic-apps\theWhoZoo-chat\node_modules\ionic-angular\polyfills\polyfills.js, 
      E:\Development\IDE\ionic-apps\theWhoZoo-chat\node_modules\sw-toolbox\sw-toolbox.js 

イオン性情報:

Your system information: 

ordova CLI: 6.4.0 
Ionic Framework Version: 2.0.0-rc.4 
Ionic CLI Version: 2.1.18 
Ionic App Lib Version: 2.1.9 
Ionic App Scripts Version: 1.0.0 
ios-deploy version: Not installed 
ios-sim version: Not installed 
OS: Windows 10 
Node Version: v6.9.2 
Xcode version: Not installed 

package.json

{ 
    "name": "ionic-hello-world", 
    "author": "Ionic Framework", 
    "homepage": "http://ionicframework.com/", 
    "private": true, 
    "scripts": { 
    "clean": "ionic-app-scripts clean", 
    "build": "ionic-app-scripts build", 
    "ionic:build": "ionic-app-scripts build", 
    "ionic:serve": "ionic-app-scripts serve" 
    }, 
    "dependencies": { 
    "@angular/common": "2.2.1", 
    "@angular/compiler": "2.2.1", 
    "@angular/compiler-cli": "2.2.1", 
    "@angular/core": "2.2.1", 
    "@angular/forms": "2.2.1", 
    "@angular/http": "2.2.1", 
    "@angular/platform-browser": "2.2.1", 
    "@angular/platform-browser-dynamic": "2.2.1", 
    "@angular/platform-server": "2.2.1", 
    "@ionic/storage": "1.1.7", 
    "@types/googlemaps": "^3.25.42", 
    "angular2-moment": "^1.1.0", 
    "angularfire2": "^2.0.0-beta.7.1-pre", 
    "firebase": "^3.6.4", 
    "ionic-angular": "2.0.0-rc.4", 
    "ionic-native": "2.2.11", 
    "ionicons": "3.0.0", 
    "rxjs": "5.0.0-beta.12", 
    "zone.js": "0.6.26" 
    }, 
    "devDependencies": { 
    "@ionic/app-scripts": "^1.0.0", 
    "typescript": "^2.0.9" 
    }, 
    "cordovaPlugins": [ 
    "cordova-plugin-whitelist", 
    "cordova-plugin-console", 
    "cordova-plugin-statusbar", 
    "cordova-plugin-device", 
    "cordova-plugin-splashscreen", 
    "ionic-plugin-keyboard" 
    ], 
    "cordovaPlatforms": [], 
    "description": "theWhoZoo-chat: An Ionic project" 
} 

すべてのヘルプ高く評価しました。

+0

感謝。私は 'npm install @ ionic/app-scripts @ latest --save-dev'を実行したが、影響はなかったようだ。私の 'package.json'には' '@ ionic/app-scripts": "^ 1.0.0"がまだ含まれていますが、上記のエラーは同じです。インストール後にコンソールを見ると、 '+ - @ ionic/app-scripts @ 1.0.0'がインストールされていることがわかります。あなたはそれが古いバージョンであると確信していますか? – Richard

+0

no..my bad..its最新のもの.. –

+0

しかし、彼らのアプリケーションベースは古いものを示しています。まだ統合されていないかもしれません... [github link](https://github.com/driftyco/ionic2 -app-base/blob/master/package.json#L28) –

答えて

1

上記のエラーは、インポートで大文字と小文字の区別の問題が原因で発生しています。

私の例では、私は次のことをやっていた:

import { MapRangeModel } from '../model/maprangeModel'; 

それはかなりされている必要がありますとき:

import { MapRangeModel } from '../model/mapRangeModel'; 
関連する問題