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.

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 issue

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.<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:open
  • Created 2 years ago
  • Reactions:21
  • Comments:23

github_iconTop GitHub Comments

5reactions
ducdv98commented, Sep 1, 2022

The same problem here. It would be nice if someone from nestjs team take a look at this issue.

5reactions
KiamboJymscommented, Dec 24, 2021

Has anybody from the team had a look at this issue yet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 13 does not work with @nestjs/ng-universal but works ...
AFAIK i think it an error from the @nestjs/ng-universal side. as a quick & dirty solution start by installing @nguniversal/express-engine ...
Read more >
package.json is not defined by "exports" - You.com
package.json' is not defined by "exports" when upgrading from v7.0.3 to v8.0.0 ... Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath '.
Read more >
Package subpath 'v4' is not defined by 'exports' | bobbyhadz
First, make sure you have the uuid module installed. Open your terminal in your project's root directory (where your package.json ) file is...
Read more >
Solved: PCF Error [ERR_PACKAGE_PATH_NOT_EXPORTED]
PCF Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v4' is not defined by "exports". ‎06-22-2021 08:42 AM. Hi all. I'm getting this error when ...
Read more >
When I run yarn start , I get this error - Reddit
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /root/.../package.json.
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