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

Treat TSLint warnings as errors in Visual Studio 2013
Where are the Performance counters in visual studio 2015 profiler?
How can I compare .text and .data segments of a .dll against the same ones in a different .dll?
Issue creating app package for windows 8.1 metro app using the visual studio wizard.
How to ensure that the /EDITANDCONTINUE directive is not ignored
TFS 2015 Update 2 TF246018 error creating agent
Visual Studio Team Services ACL
Installing Visual Studio 2015 with Update 2 throws error
TFS Not Deleting Artifacts From Source Control
How to debug a cshtml file in visual studio/ set the executable file
Custom Field Alert in TFS 2015
What header to include for an NTSTATUS when building for ARM platforms?
Visual Studio 2015 publish not installing on Windows 10 Surface 3
On-Premise Team Foundation Server missing create new project link
UnityVs Multiple Visual Studio 2015 instances
Visual Studio UWP project creating error

Categories

HOME
extjs
mc
automapper
verification
facebook-messenger
exchange-server
foaf
plaid
out-of-memory
iverilog
typeerror
magento-2.0
bing-search
malware
azure-data-lake
sentry
stored-procedures
graphql-js
responsive-design
yahoo
hystrix
google-awareness
jpa-2.0
twisted
vertica
exe
nullreferenceexception
parceler
bsd
uislider
high-availability
list-comprehension
spring-annotations
dnsmasq
envoy
universal
knights-tour
ms-media-foundation
counting
nppexec
wdk
spinner
ng-repeat
linq.js
zend-form
xcode8.2
realstudio
aws-kinesis-firehose
rm
django-static-precompiler
phppgadmin
gtk#
palindrome
kendo-editor
dynamics-crm-4
google-shopping-api
jsonix
carmen
sharepoint-apps
gwt-syncproxy
wepay
phpquery
python-cffi
perceptron
sqlbase
enaml
css-paged-media
apple
search-form
compositetype
relational-model
azure-xplat-cli
gflags
scala-swing
signed
nachos
csslint
commenting
zend-search-lucene
strdup
armv6
ax
android-authenticator
significant-digits
cyrillic
wndproc
zotonic
servercontrol
drawimage
nosetests
tablet-pc
hungarian-notation
explicit
resharper-5.1
odac
pinax
ixmldomdocument
firephp
data-retrieval
fuzzy-comparison
xap

Resources

Encrypt Message