clauderic / dnd-kit

The modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.
http://dndkit.com
MIT License
13.31k stars 659 forks source link

How to install master version and use it? #957

Open ghost opened 2 years ago

ghost commented 2 years ago

This is maybe a stupid question, but how can I install the master version using npm to use for a project? I've tried a lot of ways, but it doesn't seem to work out. I want to check if the master version has the fixes for react 18. Because the latest stable version is not working correctly for react 18.

AbdurRahamanAR commented 1 year ago

You can do something like this npm i https://github.com/clauderic/dnd-kit

kzsa commented 1 year ago

This is maybe a stupid question, but how can I install the master version using npm to use for a project? I've tried a lot of ways, but it doesn't seem to work out. I want to check if the master version has the fixes for react 18. Because the latest stable version is not working correctly for react 18.

It's not your fault.

yarn -v 3.3.1 node -v v18.13.0 Linux x86_64

  1. (I think this error is thrown because of the encrypted home dir.) $ yarn install

Error: @storybook/react-docgen-typescript-plugin@npm:1.0.2-canary.6.9d540b91e815f8fc2f8829189deb00553559ff63.0: ENAMETOOLONG: name too long, copyfile '/tmp/xfs-7fedcf83/archive.zip' -> ...

Solution: Plug in a thumb drive and set the yarn cache directory there. You can do this by modifying the yarnrc.yml file. I'm using linux, so the content is:

nodeLinker: node-modules cacheFolder: /media//PENDRIVE


2. $ yarn start

Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db


  1. (OpenSSL + MD4 ) $ yarn start:storybook

Err: 10% building 1/7 modules 6 active /home/<...>/dnd-kit/node_modules/@storybook/addon-links/preview.js-generated-config-entry.jsnode:internal/crypto/hash:71 this[kHandle] = new _Hash(algorithm, xofLen); ^

Error: error:0308010C:digital envelope routines::unsupported

Workaround (quite a bad "solution"):

$ yarn add cross-env --dev

package.json "scripts": { ... "start:storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006", ... }

Br: Zsolt

codingedgar commented 6 months ago

For latest master I

yarn start

and also

NODE_OPTIONS=--openssl-legacy-provider yarn start:storybook

bitbw commented 5 months ago

Err: 10% building 1/7 modules 6 active /home/<...>/dnd-kit/node_modules/@storybook/addon-links/preview.js-generated-config-entry.jsnode:internal/crypto/hash:71 this[kHandle] = new _Hash(algorithm, xofLen);

Reference : https://github.com/storybookjs/storybook/issues/16555

Using the Nodejs 16 LTS could resolve this question