Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Broken install (postinstall) #4

Closed
trasherdk opened this issue Jun 19, 2022 · 2 comments
Closed

Broken install (postinstall) #4

trasherdk opened this issue Jun 19, 2022 · 2 comments

Comments

@trasherdk
Copy link

Trying to install this thing:

$ pnpm i @svelte-web-fonts/google

node_modules/.pnpm/@[email protected]/node_modules/@svelte-web-fonts/google: Running postinstall script...
 ELIFECYCLE  Command failed.

And in node_modules/.pnpm/@[email protected]/node_modules/@svelte-web-fonts/google/package.json I find:

    "scripts": {
        "prebuild": "rm -rf ./dist",
        "build": "rollup -c",
        "build:watch": "rollup -c -w",
        "format": "prettier --config .prettierrc.json src/**/*.{ts,svelte} --write && npm run lint:fix",
        "lint": "svelte-check --ignore dist && eslint . --ext .ts",
        "lint:fix": "eslint . --ext .ts --fix",
        "generate": "ts-node -r dotenv/config src/generator/index.ts && npm run format",
        "postinstall": "husky install",
        "test": "jest",
        "test:watch": "jest --watch",
        "test:coverage": "jest --coverage"
    },

What's up with "postinstall": "husky install" Why would I need that?

Adding ignore-scripts = true to .npmrc did not fix it.

Installing husky globally fixed the ELIFECYCLE  Command failed. but still.

Running pnpb build results in a:
ENOENT: no such file or directory, open '/path/to/app/node_modules/.pnpm/@[email protected]/node_modules/@svelte-web-fonts/google/dist/index.js

$ tree node_modules/.pnpm/@[email protected]/node_modules/@svelte-web-fonts/
node_modules/.pnpm/@[email protected]/node_modules/@svelte-web-fonts/
└── google
    ├── LICENSE
    ├── README.md
    ├── package-lock.json
    └── package.json
@jakob-kruse
Copy link
Contributor

husky should be in prepare not in postinstall. my bad. I will push a fix today if that's okay with you

@jakob-kruse
Copy link
Contributor

The issues should be resolved in v1.0.4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants