svelte-web-fonts/google

Broken install (postinstall)

Closed this issue · 2 comments

Trying to install this thing:

$ pnpm i @svelte-web-fonts/google

node_modules/.pnpm/@svelte-web-fonts+google@1.0.3/node_modules/@svelte-web-fonts/google: Running postinstall script...
 ELIFECYCLE  Command failed.

And in node_modules/.pnpm/@svelte-web-fonts+google@1.0.3/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/@svelte-web-fonts+google@1.0.3/node_modules/@svelte-web-fonts/google/dist/index.js

$ tree node_modules/.pnpm/@svelte-web-fonts+google@1.0.3/node_modules/@svelte-web-fonts/
node_modules/.pnpm/@svelte-web-fonts+google@1.0.3/node_modules/@svelte-web-fonts/
└── google
    ├── LICENSE
    ├── README.md
    ├── package-lock.json
    └── package.json

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

The issues should be resolved in v1.0.4