interact.js icon indicating copy to clipboard operation
interact.js copied to clipboard

Errors building latest version on Mac

Open innerop opened this issue 5 years ago • 2 comments

[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

innerop avatar Dec 12 '20 04:12 innerop

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

taye avatar Dec 12 '20 12:12 taye

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

innerop avatar Dec 12 '20 16:12 innerop