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

Package.json "Property types@>=5.0 is not allowed." #234871

Closed
crutchcorn opened this issue Nov 29, 2024 · 1 comment
Closed

Package.json "Property types@>=5.0 is not allowed." #234871

crutchcorn opened this issue Nov 29, 2024 · 1 comment
Assignees

Comments

@crutchcorn
Copy link

Type: Bug

When using the TypeScript supported types@>=5.0 export API:

{
  "//": "...",
  "exports": {
    ".": {
      "import": {
        "types@>=5.0": "./ts-5/index.v5.d.ts",
        "types": "./dist/esm/index.d.ts",
        "default": "./dist/esm/index.js"
      },
      "require": {
        "types@>=5.0": "./ts-5/index.v5.d.cts",
        "types": "./dist/cjs/index.d.cts",
        "default": "./dist/cjs/index.cjs"
      }
    },
    "./package.json": "./package.json"
  },
}

I get the warning of Property types@>=5.0 is not allowed. and it does not resolve properly in my TypeScript files when importing this dependency.

VS Code version: Code 1.95.3 (Universal) (f1a4fb1, 2024-11-13T14:50:04.152Z)
OS version: Darwin arm64 24.1.0
Modes:

System Info
Item Value
CPUs Apple M1 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 4, 4, 4
Memory (System) 16.00GB (1.74GB free)
Process Argv --disable-extensions --crash-reporter-id 2372a224-1d8c-4763-be2f-2b1c35a4fbe7
Screen Reader no
VM 0%
Extensions disabled
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
0ee40948:31013168
dvdeprecation:31068756
dwnewjupyter:31046869
2f103344:31071589
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc2:31185842
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530

@aeschli
Copy link
Contributor

aeschli commented Nov 29, 2024

We are using the package.json schema from Schemastore: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json#L137

Please file an issue there (or even provide a pull request)

@aeschli aeschli closed this as completed Nov 29, 2024
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