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

8.15 requires fast-uri, which requires node:url, which makes it not bundelable for the web #2446

Closed
retorquere opened this issue Jun 3, 2024 · 22 comments

Comments

@retorquere
Copy link

retorquere commented Jun 3, 2024

edit: please stop posting "+1". The team is on it, the problem is reproducible, you're not adding useful information by posting "+1", and everyone in the thread is getting spurious mail updates.

If you are commenting because you want updates, see the big "subscribe" button to the right. If you want to mark yourself as affected, click the counting emoji below this post.


The version of Ajv you are using
8.15.0

The environment you have the problem with
esbuild, targeted to Firefox (but I believe this will be a problem for all browsers)

Your code (please make it as small as possible to reproduce the issue)

import AJV from 'ajv'

Results in node.js v8+
this works, because node:url is a native node module

@arvinxx
Copy link

arvinxx commented Jun 4, 2024

we meet the same problem, I have to pin to 8.14.0 now

@godky
Copy link

godky commented Jun 4, 2024

There are also compatibility issues with earlier versions of node.

@hanzebang
Copy link

we meet the same problem, I have to pin to 8.14.0 now

+1

@FFFFourwood
Copy link

+1

@retorquere retorquere changed the title 8.15 reqyures fast-uri, which requires node:url, which makes it not bundelable for the web 8.15 requires fast-uri, which requires node:url, which makes it not bundelable for the web Jun 4, 2024
@BroKun
Copy link

BroKun commented Jun 4, 2024

+1

@serializedowen
Copy link

+10086

@xiaojiezj
Copy link

+1

fengmk2 pushed a commit to cnpm/bug-versions that referenced this issue Jun 4, 2024
+ ajv-validator/ajv#2446

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated the application version to `8.15.0` in `package.json` with a
reason link for the change.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: raoha.rh <raohai.rh@antgroup.com>
@CrazyWood007
Copy link

+1

1 similar comment
@yhz1992
Copy link

yhz1992 commented Jun 4, 2024

+1

@Ricklzy
Copy link

Ricklzy commented Jun 4, 2024

+1,We found the same problem with nx
Snipaste_2024-06-04_15-27-39
The node environment is 14.17.5

@retorquere
Copy link
Author

retorquere commented Jun 4, 2024

If you also experience this problem, please click the thumbs-up emoji on the top comment instead of adding a note with "+1". The emoji counts automatically, and by posting "+1", everyone who commented earlier (including me) gets a mail notification.

@jasoniangreen
Copy link
Collaborator

Yep, we’re onto it. Please pin until we get a fix out asap.

@jasoniangreen
Copy link
Collaborator

There are also compatibility issues with earlier versions of node.

Can you provide more detail?

@Ricklzy
Copy link

Ricklzy commented Jun 4, 2024

There are also compatibility issues with earlier versions of node.

Can you provide more detail?

Our project uses @nx/webpack, but @nx/webpack relies on schema-utils, and schema-utils ends up using ajv

@jled7
Copy link

jled7 commented Jun 4, 2024

+1

@rupeesdev
Copy link

There are a lot of dependencies that uses ajv with an unpinned version. This is a breaking change in lower versions of node. Could you please rollback? Thanks in advance for the good work 😄

@alexander-schranz
Copy link

alexander-schranz commented Jun 4, 2024

All who are unsure how to downgrade to a previous minor version as a temporary workaround you can run:

npm install "ajv@8.14.*" --save

and should get then the previous version which does not require the fast-uri package.

denolfe pushed a commit to payloadcms/payload that referenced this issue Jun 4, 2024
ajv issue: ajv-validator/ajv#2446

This also removes css-minimizer-webpack-plugin which is not used within
bundler-webpack
@errodrigues
Copy link

errodrigues commented Jun 4, 2024

+1
Btw, 8.15.0 also broke several JSON schema validations with errors like: can't resolve reference #/properties/replace/properties/values/patternProperties/.%2B/allOf/0 from id http://foo.bar/json-schemas/myschema

Same exact JSON files validate just fine against exact same JSON schemas using Ajv 8.14.0

@joshkel
Copy link

joshkel commented Jun 4, 2024

@errodrigues, I opened that as a separate issue (#2447) to not clutter this discussion.

@kujtimprenku
Copy link

kujtimprenku commented Jun 4, 2024

+1 Btw, 8.15.0 also broke several JSON schema validations with errors like: can't resolve reference #/properties/replace/properties/values/patternProperties/.%2B/allOf/0 from id http://foo.bar/json-schemas/myschema

Same exact JSON files validate just fine against exact same JSON schemas using Ajv 8.14.0

As a workaround maybe you can override the version of ajv in package.json for the validator package such as:

"overrides": {
    "@the-validator-package": {
        "ajv": "8.14.0"
    }
},

@jasoniangreen
Copy link
Collaborator

Reverting now. New version will be 8.16.0 and will set everything back to how it was in 8.14.0. Sorry for the disruption.

@jasoniangreen
Copy link
Collaborator

Reverted in v8.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests