TypeError: [files].flat is not a function
See original GitHub issueWhat steps are needed to reproduce the bug?
Run linting inside a docker container using sh and a script.
Linting works fine locally i.e. outside of the docker container. The script runs other linting, using “ng lint”. We have no issues running multiple libraries using docker containers in our CI/CD pipeline.
What Stylelint configuration is needed to reproduce the bug?
{ “extends”: [“stylelint-config-standard”], “rules”: { “max-line-length”: 150 } }
How did you run Stylelint?
npx stylelint ‘/*.css’ and stylelint '/*.css’
Which version of Stylelint are you using?
14.9.1
What did you expect to happen?
No problems to be reported
What actually happened?
When linting is running inside a docker container, it exits with this error code:
TypeError: [files].flat is not a function at standalone (/usr/src/app/node_modules/stylelint/lib/standalone.js:160:25) at module.exports (/usr/src/app/node_modules/stylelint/lib/cli.js:484:9) at Object.<anonymous> (/usr/src/app/node_modules/stylelint/bin/stylelint.js:8:22) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at findNodeScript.then.existing (/usr/local/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)
Does the bug relate to non-standard syntax?
No response
Proposal to fix the bug
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Node version was the issue. Currently using node image cypress/base:14.15.0, which has fixed the problem
node:10.20.1-alpine
is definely not supported, sorry.Please provide a minimal but runnable reproduction next time, close for now.
If you provide the reproduction correctly, I’ll reopen it, thanks for your understanding.