Code Monkey home page Code Monkey logo

Comments (11)

cliveharber avatar cliveharber commented on August 23, 2024 1

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.

cliveharber avatar cliveharber commented on August 23, 2024

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.

vethanom avatar vethanom commented on August 23, 2024

@cliveharber ,

Please find details of my docker containers and errors:

Express Container Details:
ExpressContainer

Angular Container Details:
AngularContainer

Angular Build/Index.html Details:
AngularBuildIndexHTML

Angular Running on https://localhost:4200:
AngularRunningOnContainer4200

Express Running on https://localhost:3000:
ExpressRunningOnContainer3000

& Firefox is showing below errors:
FirefoxErrors

@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.

vethanom avatar vethanom commented on August 23, 2024

@cliveharber : Thank You Sir :)

from gettingmean-2.

Bazhanov-Ilya avatar Bazhanov-Ilya commented on August 23, 2024

Hi, @cliveharber
I followed the book referring to your code and this chapter happened in chapter 10. Tell me the solution to the problem
locator

from gettingmean-2.

cliveharber avatar cliveharber commented on August 23, 2024

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.

Bazhanov-Ilya avatar Bazhanov-Ilya commented on August 23, 2024

@cliveharber, I got errors in the console, could you help me with this.
image

from gettingmean-2.

cliveharber avatar cliveharber commented on August 23, 2024

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.

Bazhanov-Ilya avatar Bazhanov-Ilya commented on August 23, 2024

@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
image
when starting via ng serve
image

from gettingmean-2.

cliveharber avatar cliveharber commented on August 23, 2024

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.

Bazhanov-Ilya avatar Bazhanov-Ilya commented on August 23, 2024

@cliveharber, I use MongoDB 4.0.18,
the console constantly gives 3 errors
image

from gettingmean-2.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.