TryGhost / gscan

Ghost theme scanner - checks for errors and feature support
https://gscan.ghost.org
MIT License
75 stars 56 forks source link

Error when installing gscan via Yarn #391

Closed skrzepij closed 2 years ago

skrzepij commented 3 years ago

Hi. I have a problem with installing gscan on my hosting (ubuntu) via Yarn.

yarn add gscan

returns an error with missing file:

error https://registry.yarnpkg.com/gscan/-/gscan-4.1.0.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, symlink 'test/fixtures/themes/030-assets/symlink/assets/foo.png' -> '/home/sniffer/.cache/yarn/v6/npm-gscan-4.1.0-d4cca61e57642e3927b778dfe343dcdc8f4b5d88-integrity/node_modules/gscan/test/fixtures/themes/030-assets/symlink/assets/mysymlink.png'"

Same issue occurs when I'm trying to install ghost by CLI.

I've tried already to use --network-concurrency 1 flag and yarn cache clean but that didn't help.

gscan can be installed through npm without any issue, but Ghost CLI is using yarn to install this dependency under the hood..

Don't know why, but when I've downloaded gscan@4.1.0 to my PC and deleted this 030-assets directory, I was able to install it using Yarn as well (by passing the local path to the library).

ErisDS commented 2 years ago

The correct fix for this is to exclude the test folder from the package in the .npmignore file.

PRs welcome else we'll get to this next time we have a moment.

daniellockyer commented 2 years ago

I believe this was solved in https://github.com/TryGhost/gscan/commit/af9ff3eb2d75b472f614df1336b74d0e402b8cee so I'm closing this issue 🙂