-
Notifications
You must be signed in to change notification settings - Fork 68
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
The @nestjs/ng-universal package is not installing correctly in angular 13 getting Package subpath './schematics/utils' is not defined by "exports" in #755
Comments
+1 |
I've found that maybe the error is because of @nestjs/ng-universal v6.0.0 and I made the following tests: Using Maybe that will help. |
I get the same error. |
Your forth option will also produce an because the dependencies do not match that is angular 12 and angular 13. @nestjs/ng-universal@5 use angular 12 and you are trying to add it to an angular 13 project. |
Has anybody from the team had a look at this issue yet? |
It seems that ng add will take some time to be sorted to enable it to configure @nestjs/ng-universal. Before then; how do I install and configure @nestjs/ng-universal manually for @angular/cli@13. |
Has anybody from the team had a look at this issue yet? |
@KiamboJyms Did you ever get this working? Based on the Stack Overflow question here, it is still broken: |
Okay, I notice in your response you say it does not work for you, but following the instructions from HiDDeN, I was able to get it to work. I believe you missed the last step:
|
@kamilmysliwiec could you take a look at this? |
If I understood correctly then this issue should be soon resolved by @nguniversal\express-engine. |
as far as I understand, that is a different error |
Hi, I'm having the same problem also. However, for my case, angular universal was already installed beforehand. |
I found a way to fix the schematics issue. First you need to follow the top answer here on Stackoverflow: https://stackoverflow.com/questions/70052219/angular-13-does-not-work-with-nestjs-ng-universal-but-works-correctly-with-ngu . This makes it possible to install the NestJS ng-universal schematic (at least it did for me). Now if you run the following commands: For me (aside from some |
…ort guide on how I did it: nestjs/ng-universal#755 (comment) . I needed to make a custom webpack config so this might be a bandage fix for now. There might be potential issues in the future but let
@6matko i tried to install |
Almost year later, same problem..
|
have same problem, please tell anyone got solution on this |
The same problem here. It would be nice if someone from nestjs team take a look at this issue. |
the same here with Angular 14 !!! |
Getting the same error on Angular fresh Angular 14 project
Commands to reproduce:
Output:
|
Same error with Angular 14.2.10. None of the mentioned "fix" worked for me. |
Running Angular 14.0.5 , exact same error on my end |
The same error for Angular 15 (and NX repo) |
Temporary workaround:
|
Still having this issue. @sviat9440's answer helped me get past the first bump. 🙂 Angular: 16.0.4 |
I'm submitting a...
I have tried to install @nestjs/ng-universal in an an angular 13 project. After running
ng add @nestjs/ng-universal ` the package seems to install and it says Package successfully installed but then brings in an error
An unhandled exception occurred: Package subpath './schematics/utils' is not defined by "exports" in C:\Users\ADMIN\kiambol\node_modules@nguniversal\express-engine\package.json
See "C:\Users\ADMIN\AppData\Local\Temp\ng-1gySjP\angular-errors.log" for further details.
Looking at the angular-errors.log file, the full error is:
[error] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './schematics/utils' is not defined by "exports" in C:\Users\ADMIN\kiambol\node_modules@nguniversal\express-engine\package.json
at throwExportsNotFound (internal/modules/esm/resolve.js:299:9)
at packageExportsResolve (internal/modules/esm/resolve.js:522:3)
at resolveExports (internal/modules/cjs/loader.js:449:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:489:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:875:27)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object. (C:\Users\ADMIN\kiambol\node_modules@nestjs\ng-universal\schematics\install\index.js:15:17)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
Expected behaviour
The package was expected to install correctly install all dependencies and create the server files. It does not create the server folder and the server file.
I wanted to test the npm package that uses @nguniversal/express-engine and used ng add to see if my project is correctly configured and found out that @nguniversal/express-engine works correctly. I came in to a conclusion that the nestjs universal package might not be compatible with angular 13 yet.
Am I doing anything wrong?
I had tried to create new projects to test it and still arrived at the same error. Please help out I like using Nestjs though it seems at the moment am going to do the current server rendered angular project with @nguniversal/express-engine
Tools
I am using Nodejs version 14.17.6, Angular 13 and Windows 11
The text was updated successfully, but these errors were encountered: