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

Fix MegaLinter build issue #2539

Merged
merged 7 commits into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,13 @@ def build_dockerfile(
+ "RUN npm --no-cache install --ignore-scripts --omit=dev \\\n "
+ " \\\n ".join(list(dict.fromkeys(npm_packages)))
+ " && \\\n"
+ " npm audit fix --audit-level=critical || true \\\n"
# + ' echo "Fixing audit issues with npm..." \\\n'
# + " && npm audit fix --audit-level=critical || true \\\n" # Deactivated for now
+ ' echo "Cleaning npm cache..." \\\n'
+ " && npm cache clean --force || true \\\n"
+ ' && echo "Changing owner of node_modules files..." \\\n'
+ ' && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \\\n'
+ ' && echo "Removing extra node_module files..." \\\n'
+ " && rm -rf /root/.npm/_cacache \\\n"
+ ' && find . -name "*.d.ts" -delete \\\n'
+ ' && find . -name "*.map" -delete \\\n'
Expand Down
1 change: 1 addition & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ CVE-2022-42889
CVE-2022-43680
CVE-2022-46175
CVE-2023-0286
CVE-2023-29017
DS001
DS002
DS003
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
prettyjson \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/ci_light/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
secretlint \
@secretlint/secretlint-rule-preset-recommend \
@secretlint/secretlint-formatter-sarif && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/cupcake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
prettyjson \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/documentation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/javascript/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
prettyjson \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/ruby/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/salesforce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/security/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
secretlint \
@secretlint/secretlint-rule-preset-recommend \
@secretlint/secretlint-formatter-sarif && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/swift/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion flavors/terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
cspell \
sql-lint \
tekton-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/coffee_coffeelint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
@coffeelint/cli && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/copypaste_jscpd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
jscpd && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/css_stylelint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
stylelint-config-standard \
stylelint-config-sass-guidelines \
stylelint-scss && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/gherkin_gherkin_lint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
gherkin-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/graphql_graphql_schema_linter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
graphql \
graphql-schema-linter && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/groovy_npm_groovy_lint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
npm-groovy-lint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/html_htmlhint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
htmlhint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/javascript_es/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
@babel/core \
@babel/eslint-parser \
@microsoft/eslint-formatter-sarif && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/javascript_prettier/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
prettier && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/javascript_standard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
standard && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/json_eslint_plugin_jsonc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
eslint \
eslint-plugin-jsonc \
@microsoft/eslint-formatter-sarif && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/json_jsonlint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ ENV NODE_OPTIONS="--max-old-space-size=8192" \
WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
@prantlf/jsonlint && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
4 changes: 3 additions & 1 deletion linters/json_npm_package_json_lint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ WORKDIR /node-deps
RUN npm --no-cache install --ignore-scripts --omit=dev \
npm-package-json-lint \
npm-package-json-lint-config-default && \
npm audit fix --audit-level=critical || true \
echo "Cleaning npm cache..." \
&& npm cache clean --force || true \
&& echo "Changing owner of node_modules files..." \
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
&& echo "Removing extra node_module files..." \
&& rm -rf /root/.npm/_cacache \
&& find . -name "*.d.ts" -delete \
&& find . -name "*.map" -delete \
Expand Down
Loading