Disable opencollective in CI environments
See original GitHub issueType of Issue
[x] Bug Report
[ ] Feature Request
Description
When installing / building a project with ng-packagr
as a dependency in a CircleCI environment, the npm install
part fails due to the following error:
> ng-packagr@4.4.5 postinstall /home/circleci/repo/node_modules/ng-packagr
> opencollective postinstall
sh: 1: opencollective: Permission denied
wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! ng-packagr@4.4.5 postinstall: `opencollective postinstall`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the ng-packagr@4.4.5 postinstall script.
I opened the following issue on opencollective: https://github.com/opencollective/opencollective-postinstall/issues/15
Workaround
An easy workaround is to add the following to the .circleci/config.yml
jobs:
build:
...
steps:
...
- run: DISABLE_OPENCOLLECTIVE=true
- run: npm install
Suggested fix
Until https://github.com/opencollective/opencollective-postinstall/issues/15 is fixed, it should be detected whether the installation is running in a CircleCI environment and skip the opencollective postinstall script in https://github.com/ng-packagr/ng-packagr/blob/master/package.json#L136
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
@nuxt/opencollective NPM | npm.io
OPENCOLLECTIVE_FORCE. Strictly Disabled when one the following environment variables is set: OC_POSTINSTALL_TEST; OPENCOLLECTIVE_HIDE; CI ...
Read more >javascript - How do I block advertising in npm? - Stack Overflow
You can remove ads using the funding package by adding an environment variable: OPEN_SOURCE_CONTRIBUTOR=true.
Read more >opencollective-postinstall - npm package - Snyk
In some places (e.g. CI) you may want to disable this output. You can do this by setting the environment variable DISABLE_OPENCOLLECTIVE=true ....
Read more >Pack logicmoo_workspace -- node_modules/opencollective ...
In some places (e.g. CI) you may want to disable this output. You can do this by setting the environment variable DISABLE_OPENCOLLECTIVE=true ....
Read more >pnpm install
In a CI environment, installation fails if a lockfile is present but ... If you want to disable this behavior, set the recursive-install...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
cmd:
set DISABLE_OPENCOLLECTIVE = "true"
powershell:
$env:DISABLE_OPENCOLLECTIVE = "true"
check it with command
printenv
@mal90 you need to install
tsickle
. Please run:There should furthermore be more information in the log. Please post the entire log