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

Package assumes install of npm (does not allow yarn instead) #2

Closed
phantomjinx opened this issue Oct 19, 2018 · 1 comment
Closed

Comments

@phantomjinx
Copy link

Our project is using yarn and as such our CircleCI builds do not even have npm installed. Therefore, when installing and configuring patch-package, the build server errors even though patch-package is executed with --use-yarn.

[ERROR] Output:
[ERROR] /bin/sh: 1: npm: not found
[ERROR] child_process.js:644
[ERROR]     throw err;
[ERROR]     ^
[ERROR] 
[ERROR] Error: Command failed: npm run prepare
[ERROR] /bin/sh: 1: npm: not found
[ERROR] 
[ERROR]     at checkExecSyncError (child_process.js:601:13)
[ERROR]     at execSync (child_process.js:641:13)
[ERROR]     at Object.<anonymous> (/workspace/app/ui/node_modules/postinstall-postinstall/run.js:14:5)
[ERROR]     at Module._compile (module.js:652:30)
[ERROR]     at Object.Module._extensions..js (module.js:663:10)
[ERROR]     at Module.load (module.js:565:32)
[ERROR]     at tryModuleLoad (module.js:505:12)
[ERROR]     at Function.Module._load (module.js:497:3)
[ERROR]     at Function.Module.runMain (module.js:693:10)
[ERROR]     at startup (bootstrap_node.js:191:16)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.503 s
[INFO] Finished at: 2018-10-18T15:43:04Z
[INFO] Final Memory: 31M/102M

Looking at run.js, postinstall-postinstall (as well as postinstall-prepare) assume npm but neither have facility for using yarn instead.

@ds300
Copy link
Owner

ds300 commented Oct 19, 2018

Oh yeah that makes sense. postinstall-postinstall should only be useful for yarn-based workflows anyway, so I just changed it to yarn and published postinstall-postinstall@2.0.0.

Thanks for the report!

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

2 participants