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

Error: Package path ./linenumbers.js is not exported from package #2

Closed
Kaiden42 opened this issue Jul 28, 2023 · 3 comments
Closed

Comments

@Kaiden42
Copy link

Kaiden42 commented Jul 28, 2023

Problem

The new 4.x release of codejar has a breaking change which results in our build failing.

➜  dashboard-ui git:(chore/update-to-latest) ✗ ng build
...
./node_modules/ngx-codejar/fesm2020/ngx-codejar.mjs:4:0-57 - Error: Module not found: Error: Package path ./linenumbers.js is not exported from package /home/xxxxxxxx/tmp/dashboard-ui/node_modules/codejar (see exports field in /home/xxxxxxxx/tmp/dashboard-ui/node_modules/codejar/package.json)

According to the package.json in this repository, ngx-codejar depends on codejar 3.7.0. However, when installing ngx-codejar it installs the newest codejar from npm as a dependency:

➜  dashboard-ui git:(chore/update-to-latest) ✗ npm ls codejar
dashboard-ui@0.0.0 /home/xxxxxxxx/tmp/dashboard-ui
└─┬ ngx-codejar@5.2.0
  └── codejar@4.1.1

On npmjs, the package.json looks different from the one in this repository and requires codejar >=3.7.0 which results in the failing build:
https://www.npmjs.com/package/ngx-codejar?activeTab=code

Workaround

Our current workaround is to explicitly override the dependency to codejar in our package.json:

  "overrides": {
    "ngx-codejar": {
      "codejar": "3.7.0"
    }
  }
@julianpoemp
Copy link
Owner

@Kaiden42 thanks fort the report. ngx-codejar currently doesn't support codejar >= 4. At the moment I can't fix it because codejar >= 4 is missing linenumbers completely. I'll report this to Codejar and release a version 6 of ngx-codejar asap.

@julianpoemp
Copy link
Owner

opened issue here

@julianpoemp
Copy link
Owner

@Kaiden42 I just released ngx-codejar v6. This release fixes the issue. Please check out the new installation instructions.

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

2 participants