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.

Bug: Cant use nebular/auth without providing nebular/theme

See original GitHub issue

Issue type

I’m submitting a … (check one with “x”)

  • [+ ] bug report
  • feature request

Issue description

Current behavior:

Importing only nebular/auth causes an issue NullInjectorError: R3InjectorError(AppBrowserModule)[EffectsFeatureModule -> InjectionToken ngrx/effects: Feature Effects -> [object Object] -> AuthEffects -> AuthDataAccessService -> InjectionToken Nebular Auth Strategies -> NbOAuth2AuthStrategy -> InjectionToken Window -> InjectionToken Window -> InjectionToken Window]: NullInjectorError: No provider for InjectionToken Window!

Expected behavior:

serving a project without nebular/theme without issue

Steps to reproduce:

  1. create an angular 10 project
  2. import NbAuthModule.forRoot()
  3. start a project

Related code:

insert short code snippets here

Other information:

npm, node, OS, Browser

<!--
Node, npm: `node --version` and `npm --version`
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
Browser: Chrome/Safari/Firefox/etc?
-->

node version v14.3.0 npm 6.14.5 “@angular/core”: “^10.0.4”, “@nebular/auth”: “^6.0.0”, Angular, Nebular

<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
aesadafcommented, Sep 17, 2020

same issue here can we use auth without ebular theme ?

0reactions
khashashincommented, Jul 8, 2021

According to the docs it should be possible to use the @nebular/auth without @nebular/theme:

Install the module First, let’s install the module as it’s distributed as npm package. Make sure you have the Nebular Theme module up and running. Nebular Theme is required to use built-in Auth Components. If you are not going to use those at all, you can use Auth Module without the Nebular Theme module.

But I get following error in the ng console:

ng serve
> ng.cmd run app:serve --host=localhost --port=8100
[ng] - Generating browser application bundles (phase: setup)...
[ng] H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40
[ng]                 throw new Error("The target entry-point \"" + invalidTarget.entryPoint.name + "\" has missing dependencies:\n" +
[ng]                 ^
[ng] Error: The target entry-point "@nebular/auth" has missing dependencies:
[ng]  - @nebular/theme
[ng]     at TargetedEntryPointFinder.findEntryPoints (H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40:23)
[ng]     at H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\execution\analyze_entry_points.js:29:41       
[ng]     at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:28:29)
[ng]     at H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:59    
[ng]     at SyncLocker.lock (H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\locking\sync_locker.js:34:24)
[ng]     at SingleProcessExecutorSync.execute (H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:27)
[ng]     at Object.mainNgcc (H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\src\main.js:74:25)
[ng]     at Object.process (H:\Projects\p1\node_modules\@angular\compiler-cli\ngcc\index.js:29:23)
[ng]     at NgccProcessor.processModule (H:\Projects\p1\node_modules\@ngtools\webpack\src\ngcc_processor.js:175:16)  
[ng]     at H:\Projects\p1\node_modules\@ngtools\webpack\src\ivy\host.js:146:18

[ERROR] ng has unexpectedly closed (exit code 1).

        The Ionic CLI will exit. Please check any output above for error details.
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add a login page to Nebular ngx-admin without using ...
I am nwebie and just using the themes module alone from ngx-admin..I have not used auth module at all ..anyway I can able...
Read more >
@nebular/auth - npm
Start using @nebular/auth in your project by running `npm i @nebular/auth`. There are 22 other projects in the npm registry using @nebular/auth.
Read more >
An Introduction to Nebular by Akveo — #Nebular101 Pt. 1
Nebular let you choose which theme you like or equate with a design that has been provided. You can customize all style components...
Read more >
Nebular and UI Kitten: speed, quality, and success | Akveo Blog
Discover how Nebular and UI Kitten accelerate time to market and provide a solid foundation to software business solutions of any ...
Read more >
smag - npm Package Health Analysis | Snyk
[![npm](https://img.shields.io/npm/l/@nebular/theme.svg)]() [![Build ... For more information about how to use this package see README ... @nebular/auth.
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