Skip to content

Module parse failed: Unexpected token (in index.esm.js) #58

@ppo

Description

@ppo

Version: 1.0.0-alpha.1

Error

Error in ./node_modules/sanity-super-pane/dist/index.esm.js
Module parse failed: Unexpected token (159:30)
You may need an appropriate loader to handle this file type.
|
|       for (const publishedDocument of publishedDocuments) {
|         t.createIfNotExists({ ...publishedDocument,
|           _id: `drafts.${publishedDocument._id}`,
|           _updatedAt: new Date().toISOString()
 @ ./deskStructure.js (part:@sanity/desk-tool/structure 10:23-51)
 @ ./node_modules/@sanity/desk-tool/lib/utils/loadStructure.js
 @ ./node_modules/@sanity/desk-tool/lib/utils/useResolvedPanes.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/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

deskStructue.js

import S from '@sanity/desk-tool/structure-builder';
import { createSuperPane } from 'sanity-super-pane';

export default () =>
  S.list()
    .title('Base')
    .items([
      S.listItem().title('Normal List').child(createSuperPane('movie', S)),
    ]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions