You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run a test (using react-scripts test) that fails when running this line:
import DrawControl from 'react-mapbox-gl-draw';
It fails saying:
`..../node_modules/@mapbox/mapbox-gl-draw/index.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import runSetup from './src/setup';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
at Object.<anonymous> (../react-ui-components/node_modules/react-mapbox-gl-draw/lib/index.js:13:42)`
I don't use mapbox-gl-draw directly, I use it using react-mapbox-gl-draw
error - ./node_modules/mapbox-gl/dist/mapbox-gl.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm
Location: node_modules/react-mapbox-gl/lib-esm/map.js
Steps to Trigger Behavior
import DrawControl from 'react-mapbox-gl-draw';
`..../node_modules/@mapbox/mapbox-gl-draw/index.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){import runSetup from './src/setup';
^^^^^^
Expected Behavior
Test shouldn't fail when importing mapbox-gl-draw
Actual Behavior
Test fails when importing mapbox-gl-draw
Notes
I belive it's related to this issue
browser: jsdom-fourteen provided by jest
The text was updated successfully, but these errors were encountered: