The @nestjs/ng-universal package is not installing correctly in angular 13 getting Package subpath './schematics/utils' is not defined by "exports" in
See original GitHub issueI’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.<anonymous> (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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:21
- Comments:23
Top GitHub Comments
The same problem here. It would be nice if someone from nestjs team take a look at this issue.
Has anybody from the team had a look at this issue yet?