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

Visual Studio TypeScript intellisense with double underscore
Shortcut key to impliment an interface in visual studio
Wix MajorUpgrade will not detect last position of product version
How to force Visual Studio(C#) to compile using Mono(xbuild)?
Wix - relationship between heatdirectory directory and preprocessorvariable
Visual Studio Online Local Backup?
Resharper refactoring creating static methods
Code formatting for modified parts only
Display enum name instead of value in Visual Studio 2013's debugger
Small annoyance in Visual Studio's code pretty-fier
TFS keeps adding my NuGet packages
SQLite data source is missing in Visual Studio 2012 Entity Framework Connection
Visual Studio 2013 Update 4 failed to install with the following log and error
For Silverlight projects, does it matter what .NET Framework version I choose in the “New Project” dialog?
TFS Binding. What is its purpose?
How can I develop and test a policy without breaking TFS for the whole team?

Categories

HOME
class
couchdb
devexpress
semantic-web
cryptography
openflow
mithril.js
tweepy
hspi
gtk
elastic-load-balancer
fireloop
nsstring
business-intelligence
fosuserbundle
adminlte
kamailio
rxjs5
ini
animated-gif
list-comprehension
echosign
bitbake
ibm-connections
fusion
tilemill
xcrun
mongoengine
adminer
nsuserdefaults
installanywhere
forms-authentication
assemblies
minikube
jenkins-slave
absolute
intellij-lombok-plugin
tinyioc
htmlspecialchars
pen
word-2016
gapi
jsf-2.3
android-sdcard
noclassdeffounderror
swiffy
accessibilityservice
jsr363
ajax4jsf
apache-commons-digester
mixins
cache-manifest
whitespace-language
android-audiomanager
famo.us
adhoc-polymorphism
inequality
relationships
webautomation
wso2bam
iirf
objective-c-runtime
pacman
itunes-sdk
contextswitchdeadlock
tridion-2011
websphere-6.1
flymake
nsfont
multidrop-bus
infopath-2007
photo-management
grails-validation
jmenu
formal-semantics
mygeneration
solandra
ninject-interception
tessellation
icicles
urchin
database-cloning
index.dat
word-automation
account-management

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile