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

Link in a project in Visual Studio 2017?
Visual Studio 2017 Python Feature Addition Issue
Visual studio installer project - build platform configuration is N/A .. how to change?
How to launch a file when opening a solution on visual Studio
Visual Studio 2017 installer stuck at Microsoft.VisualStudio.Debugger.JustInTime
“jarsigner.exe” exited with code 1 in visual studio 2015
VS 2015 F# Script Intellisense not loading
Visual studio crashes when using intellisense with the mouse in Activity Library
While adding a TFS server to VS2017 Error: “Server already exists in the list below”
Visual Studio - Save Data Connections Options
Visual Studio 2017 Collapsing Regions
Is there a way to force the Visual Studio document tabs to a specific width?
Visual Studio is unresponsive during automation
Configure location in a Visual Studio 2015 Manifest file
Use Grunt JS as unit test in Visual Studio?
ClickOnce Security Settings Re-enables Itself When Publishing

Categories

HOME
protocol-buffers
cucumber
postgresql-9.4
mirc
ipv6
google-search-console
pyresttest
tweepy
polymer-2.x
eddystone
cname
business-intelligence
buffer
mpu6050
squirrel-sql
django-rq
heap-dump
mixpanel
nose
coroutine
jest
social-tables
pst
fido-u2f
liferay-6.2
pymongo
dragula
python-appium
intune
es6-modules
dotcms
john-the-ripper
cloudera-manager
polyml
assertions
bluemixtools
eclipse-gmf
aurelia-http-client
iscroll
utf
cloudera-sentry
bit-shift
section508
visual-format-language
webvtt
clrs
lvalue
polymaps
gmaps.js
msxml
ltrace
fitbit
elastic4s
scheduledexecutorservice
rational-performance-test
nunit-console
android-4.2-jelly-bean
declarative
simian
exists
xcopy
utf-16
mobilefirst-server
phpredis
com0com
ipod
tree-structure
console.log
n-tier-architecture
image-rotation
zend-mail
producer
windows-rt
webautomation
iosched
jmenubar
application-server
linkbutton
jquery-dialog
chronometer
sfinae
image-formats
telerik-ajax
sql-parametrized-query
git-log
chunking
resharper-5.1
principles
rakudo
html-generation

Resources

Encrypt Message