I was adding sql linting to my project which uses this library and I found on Linux, not my local mac, that it threw an error if perl-autodie was not installed. I solved it by adding:
yum makecache
yum -y install perl-autodie
Might want to add that as a required dependency.
My usage:
flowchart
A[Adding SQL Linting] --> B[https://www.npmjs.com/package/eslint-plugin-sql]
B --> C[https://github.com/gajus/pg-formatter]
C --> D[this repo]
[Container] 2023/02/20 14:40:28 Running command npm run lint:diff > ./reports/eslintoutput.txt
--
143 | Uncaught exception: Uncaught exception: Uncaught exception: Can't locate autodie.pm in @INC (@INC contains: /codebuild/output/pg-formatter/dist/pg-formatter/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/lib/pgFormatter/CLI.pm line 25.
144 | at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/pg_format line 19.
145 | main::__ANON__('Can\'t locate autodie.pm in @INC (@INC contains: /codebuild/o...') called at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/lib/pgFormatter/CLI.pm line 25
146 | pgFormatter::CLI::BEGIN() called at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/lib/pgFormatter/CLI.pm line 25
147 | eval {...} called at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/lib/pgFormatter/CLI.pm line 25
148 | require pgFormatter/CLI.pm called at /codebuild/output/src542590790/src/node_modules/pg-formatter/dist/pg-formatter/pg_format line 45
149 | BEGIN failed--compilation aborted at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/lib/pgFormatter/CLI.pm line 25.
150 | at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/pg_format line 19.
151 | main::__ANON__('Uncaught exception: Can\'t locate autodie.pm in @INC (@INC co...') called at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/lib/pgFormatter/CLI.pm line 25
152 | require pgFormatter/CLI.pm called at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/pg_format line 45
153 | Compilation failed in require at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/pg_format line 45.
154 | at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/pg_format line 19.
155 | main::__ANON__('Uncaught exception: Uncaught exception: Can\'t locate autodie...') called at /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/pg_format line 45
156 |
157 | Oops! Something went wrong! :(
158 |
159 | ESLint: 7.32.0
160 |
161 | Error: Command failed: perl /codebuild/output/src542590790/node_modules/pg-formatter/dist/pg-formatter/pg_format --function-case 0 --keyword-case 0 --spaces 4
162 | Uncaught exception: Uncaught exception: Uncaught exception: Can't locate autodie.pm in @INC (@INC contains:
I was adding sql linting to my project which uses this library and I found on Linux, not my local mac, that it threw an error if perl-autodie was not installed. I solved it by adding:
Might want to add that as a required dependency.
My usage: