taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
http://interactjs.io/
MIT License
12.31k stars 783 forks source link

Errors building latest version on Mac #874

Open innerop opened 3 years ago

innerop commented 3 years ago

[3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... $ bin/_link readlink: illegal option -- f usage: readlink [-n] [file ...] usage: dirname path usage: dirname path bin/_link: line 22: cd: /packages/@interactjs: No such file or directory

taye commented 3 years ago

I've made a change that should help: https://github.com/taye/interact.js/commit/9e8484498eaa308903c62c4e97673bc232eac2f2

innerop commented 3 years ago

I thought of doing that myself but wasn't comfortable with having the error message from readlink -f persist, so I tried to install greadlink which supports the -f option but brew is not ready for Apple Silicon

Here are the errrors I get now on yarn build (after having run yarn bootstrap)

yarn run v1.22.10 $ yarn docs && yarn bundle && _add_plugin_indexes && _types && _esnext $ node jsdoc/index.js Docs... done. $ NODE_ENV=production _bundle Bundling...Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db done. wrote packages/@interactjs/actions/drag/index.ts wrote packages/@interactjs/modifiers/index.ts wrote packages/@interactjs/pointer-events/index.ts wrote packages/@interactjs/actions/gesture/index.ts wrote packages/@interactjs/reflow/index.ts wrote packages/@interactjs/dev-tools/index.ts wrote packages/@interactjs/inertia/index.ts wrote packages/@interactjs/actions/resize/index.ts wrote packages/@interactjs/auto-scroll/index.ts wrote packages/@interactjs/auto-start/index.ts wrote packages/@interactjs/actions/drop/index.ts wrote packages/@interactjs/actions/index.ts

exec tsc -p types.tsconfig.json --outFile packages/@interactjs/types/index.d.ts packages/@interactjs/actions/drag/index.ts(2,32): error TS2307: Cannot find module '@interactjs/interact' or its corresponding type declarations.

The following lines in the referenced file seem to assume @interactjs is already installed, whereas you probably want to use the relative path.

import interact, { init } from '@interactjs/interact' import plugin from '@interactjs/actions/drag/plugin'

Basically all files being bundled are using this scheme so I get hundreds of such errors