-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
validator-ajv8
Version
6.x-beta
Current Behavior
Since a new version that fixes radiobuttons with a default object has been deployed, I wanted to install it. (beta version).
When I install this one, I get an error after the build :
(ReferenceError: module is not defined)
PS: Same error appears for @rjsf/validator-ajv8
If I go back to the 5.x, I no longer have this error.
----------------------------------
UPDATE
One thing I've tried :
Copy/paste @rjsf from node_modules to my current src, and imported components from here like
import Form from "src/custom/@rjsf/core";
=> And everything works from here.
So I think it's an issue when node_modules js file is generated on build, the only one to have an error from all other libs is this one (there is only one "module.exports" error and this is for @rjsf/core/dist/index.js)
----------------------------------
Expected Behavior
I want to be able to install latest version to try the fix for the radio buttons
Steps To Reproduce
yarn add @rjsf/core @rjsf/utils @rjsf/validator-ajv8
It installs ^6.0.0-beta.10 for these libs.
And I use Form in my component with these imports :
import Form from "@rjsf/core";
import validator from "@rjsf/validator-ajv8";
Just in case, this is what looks like my tsconfig :
{
"compilerOptions": {
"target": "ESNEXT",
"module": "commonjs",
"jsx": "react-jsx",
"declaration": true,
"outDir": "./public/build/",
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"moduleResolution": "node",
"baseUrl": "./",
"paths": {
"@*": ["assets/js/*"],
"@images": ["assets/images"]
},
"typeRoots": [
"./node_modules/@types"
] ,
"types": [
"node"
],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"resolveJsonModule": true
}
}
And I'm using React 19.1.0
Environment
- OS:Ubuntu
- Node:22
- npm:
Anything else?
Am I doing something wrong ?