question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Module not found: Error: Can't resolve '@agm/core/services/fit-bounds' in *

See original GitHub issue

Issue description

After doing npm i with "@agm/core": "~1.0.0-beta.6",, the following error happens while building:

  • ERROR in ./src/app/app.module.ngfactory.js,
  • ERROR in ./path/to/component.ngfactory.js,
  • Module not found: Error: Can't resolve '@agm/core/services/fit-bounds' in path/to/module
  • Module not found: Error: Can't resolve '@agm/core/services/fit-bounds' in path/to/component.

Steps to reproduce and a minimal demo of the problem

  1. Provide FitBoundsService to a module:
  • import { FitBoundsService } from '@agm/core/services/fit-bounds';
  • @NgModule({ ..., providers: [ FitBoundsService ], ...})
  1. Import FitBoundsService in a component:
  • import { FitBoundsService } from '@agm/core/services/fit-bounds';

Current behavior

Fails with previously described build errors.

Expected/desired behavior

Build should not fail.

angular-google-maps, Angular, & any other relevant dependency versions

  • @agm/core”: “^1.0.0” or “@agm/core”: “~1.0.0-beta.6”,
  • “@angular/*”: “~8.1.1”

NOTE: everything works as expected if I pin @agm/core to 1.0.0-beta.6,

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
randallmeekercommented, May 19, 2020

I’m seeing the same behavior on version 1.1.0

I’m trying to follow this conversion, but am a bit confused. My use case is that i’m extending AgmMap in my own class in order to achieve some functionality. This requires me to call super() with FitBoundsService

Angular CLI: 8.2.1
Angular: 8.2.14
0reactions
filipjakovcommented, Sep 30, 2019

Ok, thanks guys 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Error: Can't resolve '@agm/core/services/fit ...
Issue description After doing npm i with "@agm/core": "~1.0.0-beta.6",, the following error happens while building: ERROR in .
Read more >
Module not found: Error: Can't resolve 'fs' in - Stack Overflow
The error is because of angular-cli does not support modules in node like "fs" and "path". (Issue). Add the following to the root...
Read more >
Can't resolve 'SimpleBar' Error while stencil start
I'm using Covent+Garden-2.3.1 theme, so i download theme from store and try to do stencil start i get below error. Module not found:...
Read more >
How to fix 'Module not found: Can't resolve 'http' in ... - YouTube
Your browser can't play this video. ... How to fix ' Module not found : Can't resolve 'http' in ...' error with FCL...
Read more >
Module not found: Error: Can't resolve 'http' [Solved] | bobbyhadz
The error Module not found: Error: Can't resolve 'http' occurs because there has been a breaking change in Webpack version 5. To solve...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found