visual-studio


Ionic: Error: Module build failed: Error: ENOENT: no such file or directory


I am using Ionic, and get the following error:
Runtime Error Uncaught (in promise): Error: Module build failed:
Error: ENOENT: no such file or directory, open
'/Users/richardmarais/Development/ionic/theWhoZoo/src/pages/model/ratingModel.js'
The error is a result of this line of code:
this.ratingModel = new RatingModel();
When I remove this line, I don't get the error.
ratingModel.ts
import { Injectable } from "#angular/core";
import { PersonModel } from './personModel';
import { JobModel } from './jobModel';
#Injectable()
export class RatingModel {
public id: number = null;
public job: JobModel = null;
public review: string = null;
public rating: number = null;
public reviewDate: number = null;
public time: string = null;
public person: PersonModel = null;
public anonymous: number = null;
constructor() {
}
}
Reading other forums, people are getting this error due to the case not matching in their imports, but I have checked mine, and they do match.
import { RatingModel } from '../model/ratingModel';
However, I have noticed something strange in my IDE (Visual Studio Code):
As you can see, in the search results, there are two files for the object, ratingModel.ts and RatingModel.ts. But when I check the actual files system, there is only on file, ratingModel.ts:
Question
Does anyone know what and how to resolve what looks like possibly a bug or fault here?
Thanks
More info:
global packages:
#ionic/cli-utils : 1.0.0
Cordova CLI : 6.4.0
Ionic CLI : 3.0.0
local packages:
#ionic/app-scripts : 1.3.0
#ionic/cli-plugin-cordova : 1.0.0
#ionic/cli-plugin-ionic-angular : 1.0.0
Ionic Framework : ionic-angular 3.2.1
System:
Node : v7.10.0
OS : macOS Sierra
Xcode : Xcode 8.3.2 Build version 8E2002
ios-deploy : not installed
ios-sim : not installed

Related Links

How to set up and maintain directory structure in TFS build server?
How to Change Output directory Of a Type Script File in Visual Studio 2013
Add link or shortcut to web page to Visual Studio solution
visual studio 2013 ultimate “invalid pointer” ( Windows phone )
How can I keep Visual Studio from adding a reference to my Unit Tests project?
Get Current Sprint/Iteration in a Build Process Template?
error while installing visual studio 2015 RC
App working both on windows 8 and windows 8.1
error c2228 left of '.ptr' must have class/struct/union
Visual Studio 2013 freezes constantly
Visual Studio - Code Formatting (curly braces)
Bug in Visual Studio 2012
How to build code using MSBuild.exe from comand line without Visual Studio
Two applications in solution: Payload contains two or more files with the same destination path 'App.xbf'
APPX0502 Build fail in tfs but work in visual studio 2015
Find and Replace on Visual studio with keeping the number

Categories

HOME
verification
whmcs
ios-simulator
histogram
websocket
web2py
mirc
openfoam
specifications
polymer-2.x
selection
slide
bootstrap-switch
jquery-file-upload
squirrel-sql
jodatime
tomcat8
jqxgrid
gravity
susy-sass
cloudsim
cmake-gui
angular2-highcharts
yii2-basic-app
web-analytics
acl
exchange-server-2010
macromedia
django-import-export
sfml
nic
sca
om-next
counting
devtools
grails-2.5
utf
classnotfoundexception
flipkart
word-cloud
nuclio
realstudio
swift2.3
directwrite
cloudwatch
image-registration
subforms
swiperefreshlayout
bigdecimal
zynq
rails-engines
gwt-syncproxy
vim-plugin
in-app-billing
ruby-on-rails-4.1
bjam
netdatacontractserializer
blockquote
postal-code
relational-model
deque
prism-4
android-audiomanager
r.java-file
pass-by-value
fat32
microsoft-expression-web
ecos
accessory
jack
gpu-programming
oxygene
meteorite
compiler-flags
apache-shindig
revmob
google-code-prettify
hints
jacob
html-frames
spiral
cyrillic
office-app
user-forums
kaazing
pageheap
liveconnect
asio
glassfish-esb
datacontracts
formal-semantics
hungarian-notation
asdoc
mysqli-multi-query
google-translator-toolkit
inversion
autobench

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App