-
-
Notifications
You must be signed in to change notification settings - Fork 17
Installing fails to create binary — missing prepare script #58
Copy link
Copy link
Open
Description
When installing with yarn: yarn global add czottmann/linearis
The linearis binary is not created. yarn global list shows the package and its binary, but the symlink in ~/.yarn/bin/ is missing.
Cause: The bin field points to dist/main.js, but dist/ is not committed to the repo and there is no prepare (or preinstall) script in package.json to run the build step. Yarn fetches the source, finds no dist/main.js, and skips the symlink.
Workaround:
cd "$(yarn global dir)/node_modules/linearis"
npm install && npm run build
ln -s "$(yarn global dir)/node_modules/linearis/dist/main.js" "$(yarn global bin)/linearis"Suggested fix: Add a prepare script to package.json:
"scripts": {
"prepare": "tsc && chmod +x dist/main.js",
...
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels