Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module parse failed: Unexpected token #24

Open
MichaelPrecel opened this issue Aug 23, 2022 · 2 comments
Open

Module parse failed: Unexpected token #24

MichaelPrecel opened this issue Aug 23, 2022 · 2 comments

Comments

@MichaelPrecel
Copy link

Hi @Grsmto – thanks for this plugin!

Unfortunately after following the install instructions I'm receiving the below error. I have added an access token to './config/mapbox-input.json', with no success.

Do you have any advice to get this up and running?

Error in ./node_modules/@math.gl/web-mercator/dist/esm/fly-to-viewport.js
Module parse failed: Unexpected token (50:17)
You may need an appropriate loader to handle this file type.
| }
| export function getFlyToDuration(startProps, endProps, options) {
|   const opts = { ...DEFAULT_OPTS,
|     ...options
|   };
 @ ./node_modules/@math.gl/web-mercator/dist/esm/index.js 6:0-79
 @ ./node_modules/react-map-gl/node_modules/viewport-mercator-project/module.js
 @ ./node_modules/react-map-gl/dist/esm/index.js
 @ ./node_modules/sanity-plugin-mapbox-input/lib/GeopointInput.js (part:@sanity/form-builder/input/geopoint)
 @ ./node_modules/@sanity/form-builder/lib/legacyParts.js
 @ ./node_modules/@sanity/form-builder/lib/sanity/SanityFormBuilderContext.js
 @ ./node_modules/@sanity/form-builder/lib/sanity/legacyPartImplementations/form-builder.js (part:@sanity/form-builder)
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/documentViews/FormView.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/documentViews/index.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/DocumentPanel.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/index.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/DocumentPane.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/index.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/DeskToolPane.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/index.js
 @ ./node_modules/@sanity/desk-tool/lib/DeskTool.js
 @ ./node_modules/@sanity/desk-tool/lib/_parts/base-tool.js
 @ ./node_modules/@sanity/vision/lib/VisionTool.js (all:part:@sanity/base/tool)
 @ ./node_modules/@sanity/default-layout/lib/util/getRegisteredTools.js
 @ ./node_modules/@sanity/default-layout/lib/router.js
 @ ./node_modules/@sanity/default-layout/lib/Root.js (part:@sanity/base/root)
 @ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
 @ ./node_modules/@sanity/server/lib/browser/entry-dev.js
 @ multi ./node_modules/@sanity/server/lib/browser/entry-dev.js

Error in ./node_modules/mjolnir.js/dist/esm/event-manager.js
Module parse failed: Unexpected token (50:25)
You may need an appropriate loader to handle this file type.
|             this.manager.emit(event.type, event);
|         };
|         this.options = { ...DEFAULT_OPTIONS, ...options };
|         this.events = new Map();
|         this.setElement(element);
 @ ./node_modules/mjolnir.js/dist/esm/index.js 1:0-58
 @ ./node_modules/react-map-gl/dist/esm/components/interactive-map.js
 @ ./node_modules/react-map-gl/dist/esm/index.js
 @ ./node_modules/sanity-plugin-mapbox-input/lib/GeopointInput.js (part:@sanity/form-builder/input/geopoint)
 @ ./node_modules/@sanity/form-builder/lib/legacyParts.js
 @ ./node_modules/@sanity/form-builder/lib/sanity/SanityFormBuilderContext.js
 @ ./node_modules/@sanity/form-builder/lib/sanity/legacyPartImplementations/form-builder.js (part:@sanity/form-builder)
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/documentViews/FormView.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/documentViews/index.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/DocumentPanel.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/documentPanel/index.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/DocumentPane.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/document/index.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/DeskToolPane.js
 @ ./node_modules/@sanity/desk-tool/lib/panes/index.js
 @ ./node_modules/@sanity/desk-tool/lib/DeskTool.js
 @ ./node_modules/@sanity/desk-tool/lib/_parts/base-tool.js
 @ ./node_modules/@sanity/vision/lib/VisionTool.js (all:part:@sanity/base/tool)
 @ ./node_modules/@sanity/default-layout/lib/util/getRegisteredTools.js
 @ ./node_modules/@sanity/default-layout/lib/router.js
 @ ./node_modules/@sanity/default-layout/lib/Root.js (part:@sanity/base/root)
 @ ./node_modules/@sanity/base/lib/components/SanityRoot.js (part:@sanity/base/sanity-root)
 @ ./node_modules/@sanity/server/lib/browser/entry-dev.js
 @ multi ./node_modules/@sanity/server/lib/browser/entry-dev.js
@ApinisMikelis
Copy link

Same here. Does not work out of the box. Some input very welcome

@MichaelPrecel
Copy link
Author

Hi @ApinisMikelis — from memory I couldn't resolve this and instead switched over to the sanity-plugin-leaflet-input plugin instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants