Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS2307: Cannot find module '@nestjs/ng-universal/tokens' or its corresponding type declarations. #573

Open
DaSchTour opened this issue May 6, 2021 · 8 comments

Comments

@DaSchTour
Copy link

I'm submitting a...


[ ] Regression 
[X] Bug report
[ ] Feature request
[X] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

TS2307: Cannot find module '@nestjs/ng-universal/tokens' or its corresponding type declarations.

Expected behavior

No TS error

Minimal reproduction of the problem with instructions

import { REQUEST } from '@nestjs/ng-universal/tokens';

Environment


Nest version: 4.3.0

 
For Tooling issues:
- Node version: 14.16.0
- Platform: Mac

Others:
WebStorm, NPM and NX
@DaSchTour
Copy link
Author

BTW using @nestjs/ng-universal/dist/tokens works but throws a CommonJS or AMD dependencies can cause optimization bailouts. warning

@macure
Copy link

macure commented May 12, 2021

Same issue as well

@quinnjr
Copy link
Contributor

quinnjr commented Jul 27, 2021

Seeing the same issue as well.

AliYusuf95 added a commit to AliYusuf95/ng-universal that referenced this issue Sep 30, 2021
@tincho-despegar
Copy link

Same issue as well

AliYusuf95 added a commit to AliYusuf95/ng-universal that referenced this issue Dec 18, 2021
@Salarov
Copy link

Salarov commented Jan 31, 2022

I am wondering why after almost a year this issue is still open without any fix!
Shouldn't we use Nestjs for SSR?

@DaSchTour
Copy link
Author

And it's only merging the linked PR. Maybe we need to mention some of the maintainers to raise attention?

@DaSchTour
Copy link
Author

As a workaround I just published a package with this fix. You can drop it into the current installation without changing imports by adding "@nestjs/ng-universal": "npm:@nestjs-fixed/[email protected]", to your package.json.

DaSchTour pushed a commit to DaSchTour/ng-universal that referenced this issue Sep 19, 2022
@DaSchTour
Copy link
Author

While this issue is still not fixed in 7.0.0 and this package does not work as described in the README I published a new version with an adjusted token export. Use "@nestjs/ng-universal": "npm:@nestjs-fixed/[email protected]", to be able to import tokens as described in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants