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.

prod build fails - 'could not resolve ../imports/localforage/'

See original GitHub issue

Hello,

Although the dev build passes ok, building with --prod flag causes the following error:

ERROR in Error during template compile of 'AppModule'
  Could not resolve ../imports/localforage relative to /home/green/develop/angular6-imageslider-interview-app/node_modules/ngforage/ngforage.d.ts. in 'NgForageConfig'
    'NgForageConfig' contains the error at ../ngforage/ngforage.ts(19,53).

Ubuntu, Angular&CLI 6.0.8 clean app on default configs; am I missing something?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
grreeenncommented, Jun 26, 2018

hi @armory09, when I think about it now, the only thing I did was to change the default drivers with the string “asyncStorage”, as it’s shown in the demo. Everything else remained the same…

0reactions
metalelf0commented, Jan 4, 2021

I’m having the same issue. @grreeenn fix does the trick, though it’s not very clear why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

localforage not work in build · Issue #840 - GitHub
I'm using localforage in my code: import { Inject, Injectable, ... My compiled app shows the error “Cannot find module 'localforage'”.
Read more >
localforage not work in build - Stack Overflow
I'm using localforage in my code: import { Inject, Injectable, InjectionToken } from '@angular/core'; import * as LocalForage from ...
Read more >
localforage - npm
localForage improves the offline experience of your web app by using asynchronous storage (IndexedDB or WebSQL) with a simple, localStorage - ...
Read more >
How to Use localForage for Easy Async Browser Storage
Storing data in the browser can be much easier than you think, thanks so localForage, a JavaScript library that simplifies asynchronous ...
Read more >
How to use the localforage.WEBSQL function in ... - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues ... import localforage from 'localforage'; import...
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