import VanillaPicker from './vanilla-picker';
^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:471:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:513:25)
at Object.<anonymous> (node_modules/jsoneditor/src/js/JSONEditor.js:11:5)
How do you import jsoneditor in your code?
I'm using it on angular 8:
package.json:
"ang-jsoneditor": "^1.8.2",
"jsoneditor": "^7.0.2",
Then on my code:
import { JsonEditorOptions } from 'ang-jsoneditor';
This only happens when i run specs with "npm run test"
In the error I see:
at Object.<anonymous> (node_modules/jsoneditor/src/js/JSONEditor.js:11:5)
I think there is an issue since 7.0.0 that the index.js of the library is pointing to the wrong file, src/js/JSONEditor.js, should be dist/jsoneditor.js. Will fix this asap, thanks for reporting!
thanks @josdejong
@guiferrpereira can you try v7.0.3, see if this solves your issue? Thanks!
@josdejong it solved the issue. thanks a lot