Code Monkey home page Code Monkey logo

Comments (4)

StefKors avatar StefKors commented on May 30, 2024 3

For me the issue was that when my IDE (WebStorm) added the import automatically it got imported as:

import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';

while the correct import should be:

import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';

It might still require the same fix however it took me an embarrassing long time to realize the import path was wrong.

from pragmatic-drag-and-drop.

buzzie-bee avatar buzzie-bee commented on May 30, 2024 2

To add some further examples where VSCode by default imported from incorrect paths:

import { Instruction, ItemMode } from '@atlaskit/pragmatic-drag-and-drop-hitbox/dist/types/tree-item';
import { draggable, dropTargetForElements, monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/dist/types/adapter/element-adapter';
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/dist/types/entry-point/element/pointer-outside-of-preview';
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/dist/types/entry-point/element/set-custom-native-drag-preview';
import { combine } from '@atlaskit/pragmatic-drag-and-drop/dist/types/public-utils/combine';

Should instead be:

import { Instruction, ItemMode } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';
import { draggable, dropTargetForElements, monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
import { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';

from pragmatic-drag-and-drop.

alexreardon avatar alexreardon commented on May 30, 2024

cc @ReDrUm

from pragmatic-drag-and-drop.

alexreardon avatar alexreardon commented on May 30, 2024

👋 Thank you for raising this.

  1. We plan on adding exports to all packages soon
  2. It looks like you have got yourself unstuck for now with patch-package, which is awesome
  3. I was unable to replicate your issue 🤔

Standalone vite demo on Stackblitz

vite/5.2.8 linux-x64 node-v18.18.0

from pragmatic-drag-and-drop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.