react-json-editor-ajrm
react-json-editor-ajrm copied to clipboard
Installation instructions are incomplete
- What version of RJEA are you using (react-json-editor-ajrm version)? *REQUIRED 2.5.13
- What operating system and processor architecture are you using? *REQUIRED 2019 Intel Mac Monterey
- What did you do? *REQUIRED
followed instructions to
npm i --save react-json-editor-ajrm
andimport JSONInput from 'react-json-editor-ajrm'; import locale from 'react-json-editor-ajrm/locale/en';
- What did you expect to see? *REQUIRED
Could not resolve the library, had to run
npm i @types/react-json-editor-ajrm
then error appeared on
line
import locale from react-json-editor-ajrm/locale/end
"TS7016: Could not find a declaration file for module 'react-json-editor-ajrm/locale/en'. <absolute_path> implicitly has an 'any' type. If the 'react-json-editor-ajrm' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-json-editor-ajrm'
- What did you see instead? *REQUIRED
Working setup instructions getting example file to working order
It is in working order. Your issue is that you are using typescript but this project doesn't provide types. You need to tell your project a global type for it. Add a global.d.ts file with the following
declare module "react-json-editor-ajrm/locale/en";
Then it will import as any