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 Do I Launch a Bat in Visual Studio via a Button
Using NPM, Gulp, Grunt, Bower etc with Visual Studio 2013
TypeScript - duplicate identifier in lib.ts
Using the Node version of tsc with Visual Studio 2015 TypeScript Extension
Visual Studio 2015 - how to run: vs2015.1 rc.exe /override feed url <Path to feed.xml>
MSBuild cannot recursively copy files with Copy task
How to print console.writeline() using Installer WebSetup project in Visual Studio 2008
visual studio community 2013 and 2015 crash with setup
Unable to inspect PowerShell string[] arrays in Visual Studio 2015 debug watch/locals windows
can't build old VS2010 project with VS2013. (build tool for VS2010 cannot be found.)
Possible memory leak on Visual Studio 2013 Update 5?
Port color theme from visual studio code to visual studio
How to enable xml autocompletion for liquibase changesets in Visual Studio?
Can't find server explorer Microsoft Visual Studio 2015
Suppressing issues from Roslyn code Analyzers
Page breaks within a multi-nested RDLC report on VS 2013

Categories

HOME
apache-nifi
shinyapps
clearcase
applescript
swi-prolog
dafny
nsis
impala
capistrano
firebase-dynamic-links
scheduler
kurento
jpa-criteria
match
buffer
responsivevoice
jquery-file-upload
asciimath
exe
robolectric
spam
angular2-highcharts
workday
bosun
perfino
pyopencl
jpa-2.1
android-cardview
sap-lumira
marquee
php-5.3
basic-authentication
sca
adminer
orchardcms-1.8
netstat
nsuserdefaults
cordys-opentext
variable-variables
ng-repeat
rdp
assemblies
microkernel
grunt-contrib-watch
nuclio
qvtkwidget
sonicmq
renderman
mura
http-basic-authentication
polymaps
front-camera
fitbit
gawk
yargs
haraka
zynq
ftp-client
fiber
qpixmap
ajaxmin
android-syncadapter
psd
android-expansion-files
cryptojs
variable-length-array
fanotify
mixins
featuretoggle
erlog
physicsjs
mxe
htmltidy
sql-processor
jcheckbox
phonegap-facebook-plugin
password-recovery
flurry-analytics
igor
osascript
windows-messages
commenting
rails-api
meteor-collections
webaii
strdup
discovery
xsd2code
insertonsubmit
notifyjs
delphi-xe4
arel
significant-digits
tridion-2011
spark-view-engine
playorm
first-class
background-repeat
will-paginate
office-automation
fork-join
mongrel
chunking
principles
aspbutton
resharper-5.0
subtext
iphone-sdk-3.1.3
isapi-redirect

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