Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-git-hooks package causes issue with Yarn PnP #351

Open
Looooong opened this issue Jun 27, 2022 · 0 comments
Open

node-git-hooks package causes issue with Yarn PnP #351

Looooong opened this issue Jun 27, 2022 · 0 comments

Comments

@Looooong
Copy link

Installing react-native-calendar-strip with Yarn 2 and PnP enabled would result in the following error:

# This file contains the result of Yarn building a package (react-native-calendar-strip@virtual:3567eff399af52e12588fde2b231d8f70e2493e0315d1aa647bee79d34fd18d77a3f7589995b83252d12b287908ae0e374aa2085e8207890918894d67263315e#npm:2.2.6)
# Script name: postinstall

C:\Projects\fitmode-mobile\.pnp.cjs:35643
      Error.captureStackTrace(firstError);
            ^

Error: Qualified path resolution failed: we looked for the following paths, but none could be accessed.

Source path: C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\package.json
Not found: C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\package.json
Not found: C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\package.json.js
Not found: C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\package.json.json
Not found: C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\package.json.node

Require stack:
- C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\node_modules\node-git-hooks\install-git-hooks.js
- C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\node_modules\node-git-hooks\bin\install.js
    at Function.require$$0.Module._resolveFilename (C:\Projects\fitmode-mobile\.pnp.cjs:35643:13)
    at Function.require$$0.Module._load (C:\Projects\fitmode-mobile\.pnp.cjs:35497:42)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at installGitHooks (C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\node_modules\node-git-hooks\install-git-hooks.js:8:19)
    at Object.<anonymous> (C:\Projects\fitmode-mobile\.yarn\unplugged\node-git-hooks-npm-1.0.6-8780059d3f\node_modules\node-git-hooks\bin\install.js:5:8)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.require$$0.Module._extensions..js (C:\Projects\fitmode-mobile\.pnp.cjs:35687:33)
    at Module.load (node:internal/modules/cjs/loader:981:32)

This is a bug in node-git-hooks package, which is triggered via postinstall script. However, this concerns react-native-calendar-strip package as the consumers of this library don't need/care about the side effect of postinstall script in this library. Given that node-git-hooks is not so popular and have not been received updates frequently, can you remove the postinstall script along with node-git-hooks and instead update the contribution guidlines to tells the developers to eslint the source code before commiting?

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

No branches or pull requests

1 participant