Skip to main content
Version: 1.0.0

Troubleshooting

In this section, you will learn how to troubleshoot your application. We're trying our best to resolve all issues described below.

Duplicate declaration "Expression" error

TypeError: Duplicate declaration "Expression"
22 | };
23 |
> 24 | function Expression({
| ^^^^^^^^^^
25 | expressionError,
26 | name,
27 | onChange,
at normalizeFile.next (<anonymous>)
at run.next (<anonymous>)
at transform.next (<anonymous>)
LOG from ./node_modules/sass-loader/dist/cjs.js sass-loader ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[1].oneOf[7].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[7].use[4]!./src/index.scss

Go to the components/ExpressionBuilder/Expression.tsx file within the Forminer directory and change the Expression function name to any other, for example, Expression2.

See the code
```tsx
function Expression2({
expressionError,
name,
onChange,
setExpressionError,
translations,
value,
}: ExpressionProps) {}
const { model } = useForm<{ schema?: FieldType[] }>();
// ...
}

```

```tsx
export const ExpressionField = connectField<ExpressionProps>(Expression2, {
initialValue: false,
});
```

Export was not found errors

ERROR in ./src/Forminer/components/uniforms/index.ts 3:0-67
export 'AutoFieldProps' (reexported as 'AutoFieldProps') was not found in './AutoField' (possible exports: default)

ERROR in ./src/Forminer/components/uniforms/index.ts 4:0-70
export 'AutoFieldsProps' (reexported as 'AutoFieldsProps') was not found in './AutoFields' (possible exports: default)

ERROR in ./src/Forminer/components/uniforms/index.ts 7:0-67
export 'BoolFieldProps' (reexported as 'BoolFieldProps') was not found in './BoolField' (possible exports: default)

Go to components/uniforms/index.ts file within the Forminer directory and change the file as follows:

See the code
```tsx
export { default as AutoField } from './AutoField';
export type { AutoFieldProps } from './AutoField';
export { default as AutoFields } from './AutoFields';
export type { AutoFieldsProps } from './AutoFields';
export { default as AutoForm } from './AutoForm';
export { default as BaseForm } from './BaseForm';
export { default as BoolField } from './BoolField';
export type { BoolFieldProps } from './BoolField';
export { default as DateField } from './DateField';
export type { DateFieldProps } from './DateField';
export { default as ErrorField } from './ErrorField';
export type { ErrorFieldProps } from './ErrorField';
export { default as ErrorsField } from './ErrorsField';
export type { ErrorsFieldProps } from './ErrorsField';
export { default as HiddenField } from './HiddenField';
export type { HiddenFieldProps } from './HiddenField';
export { default as ListAddField } from './ListAddField';
export type { ListAddFieldProps } from './ListAddField';
export { default as ListDelField } from './ListDelField';
export type { ListDelFieldProps } from './ListDelField';
export { default as ListField } from './ListField';
export type { ListFieldProps } from './ListField';
export { default as ListItemField } from './ListItemField';
export type { ListItemProps } from './ListItemField';
export { default as LongTextField } from './LongTextField';
export type { LongTextFieldProps } from './LongTextField';
export { default as NestField } from './NestField';
export type { NestFieldProps } from './NestField';
export { default as NumField } from './NumField';
export type { NumFieldProps } from './NumField';
export { default as QuickForm } from './QuickForm';
export { default as RadioField } from './RadioField';
export type { RadioFieldProps } from './RadioField';
export { default as SelectField } from './SelectField';
export type { SelectFieldProps } from './SelectField';
export { default as SubmitField } from './SubmitField';
export type { SubmitFieldProps } from './SubmitField';
export { default as TextField } from './TextField';
export type { TextFieldProps } from './TextField';
export { default as ValidatedForm } from './ValidatedForm';
export { default as ValidatedQuickForm } from './ValidatedQuickForm';
```

Current limitations

Currently, we're not able to support tsconfig.json while using Babel with Typescript that includes the src directory, in which your Forminer code is located, for example:

See the code
```json
{
"compilerOptions": {
"target": "es2019",
"lib": ["dom", "dom.iterable", "es2019"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src/**/*"]
}
```

To run the app using combination of Babel and Typescript it's needed to update the tsconfig.json file and add:

"include": []