Comments (11)
The issue is that the Docker container doesn't expose port 4200 for the Angular application, nor does it start it up which is an oversight on my part. I'll roll a fix in the next few days.
from gettingmean-2.
Hi
Could you post me the HTML that gets generated? I'm not convinced that it needs the '/build' part of the path, so I'd like to see what its generating.
Could you also send me the actual versions of Angular, Node and Express and the full error that your project is using. I like to make sure that they are consistent with the versions specified in the package.json file for this project.
Cheers
Clive
from gettingmean-2.
Please find details of my docker containers and errors:
Angular Build/Index.html Details:
Angular Running on https://localhost:4200:
Express Running on https://localhost:3000:
& Firefox is showing below errors:
@cliveharber : Please let me know if any other details are needed.
It works fine when I run in local environment, its only has issues when I run it using Docker.
Thanks
from gettingmean-2.
@cliveharber : Thank You Sir :)
from gettingmean-2.
Hi, @cliveharber
I followed the book referring to your code and this chapter happened in chapter 10. Tell me the solution to the problem
from gettingmean-2.
The text in the book puts the bootstrap.min.js asset in the path assets/javascripts/bootstrap.min.js. This error looks to be say that the browser is expecting the bootstrap.min.js file to be on the path assets/js/bootstrap.min.js. Check the references to this file in your index.html file and that this file exists on the expected path
from gettingmean-2.
@cliveharber, I got errors in the console, could you help me with this.
from gettingmean-2.
Without seeing the code that you have, I'm not sure what the issue is. Is there somewhere you can put it so that I can see it?
from gettingmean-2.
@cliveharber, the code matches your code from chapter 12 with the changed route in index.html line 21 to <script src="assets/javascripts/bootstrap.min.js"></script>
when starting via npm start
when starting via ng serve
from gettingmean-2.
It looks like you're using MongoDB 4.2 or greater. In this version of the database, the API for $geoNear changed. This happened earlier this year, long after the book was published.
In app_api/controllers/locations.js, function locationsListByDistance needs to change slightly.
Change the geoOptions object to:
const geoOptions = {
distanceField: 'distance.calculated',
key: 'coords',
spherical: true,
maxDistance: 20000,
}
and then change the Loc.aggregate function (~ line 22):
const results = await Loc.aggregate([
{
$geoNear: {
near,
...geoOptions,
},
},
{ $limit: 10 },
])
This should get the maps working again.
from gettingmean-2.
@cliveharber, I use MongoDB 4.0.18,
the console constantly gives 3 errors
from gettingmean-2.
Related Issues (11)
- Can't find code of illustratioin in github HOT 2
- NODE_ENV if statement in section 5.5.3 not in chapter-05 branch HOT 10
- Creating a new request HOT 12
- Manually inputting values not working HOT 7
- Heroku: no option! What to use HOT 1
- Chapter 8: connection to local MongoDB failed? data not shown in app
- Not able to run application in Docker HOT 4
- main.f1591746b38f1c40b495.js:1 Uncaught Error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document. HOT 1
- TypeError when calling the API into renderHomepage() HOT 1
- "$geoNear no longer supports the 'limit' parameter. Use a $limit stage instead." HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gettingmean-2.