Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handled undefined args while checking whether colors are supported or not #353

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nt126716
Copy link

Failing to handle invalid or not available process args, this happens if we are trying to access colors library in NextJS middleware.

Stacktrace:
⨯ Error [TypeError]: Cannot read properties of undefined (reading 'indexOf')
at (webpack-internal:///(middleware)/../../../node_modules/colors/lib/system/has-flag.js:30)
at module.exports (webpack-internal:///(middleware)/../../../node_modules/colors/lib/system/has-flag.js:30:28)
at eval (webpack-internal:///(middleware)/../../../node_modules/colors/lib/system/supports-colors.js:34:5)
at (middleware)/../../node_modules/colors/lib/system/supports-colors.js (file:///.../dist/.next/server/src/middleware.js:964:1)
at webpack_require (file:///.../.next/server/edge-runtime-webpack.js:37:33)
at fn (file:///.../.next/server/edge-runtime-webpack.js:294:21)

… not

Failing to handle invalid or not available process args, this happens if we are trying to access colors library in NextJS middleware.

Stacktrace:
 ⨯ Error [TypeError]: Cannot read properties of undefined (reading 'indexOf')
    at <unknown> (webpack-internal:///(middleware)/../../../node_modules/colors/lib/system/has-flag.js:30)
    at module.exports (webpack-internal:///(middleware)/../../../node_modules/colors/lib/system/has-flag.js:30:28)
    at eval (webpack-internal:///(middleware)/../../../node_modules/colors/lib/system/supports-colors.js:34:5)
    at (middleware)/../../node_modules/colors/lib/system/supports-colors.js (file:///.../dist/.next/server/src/middleware.js:964:1)
    at __webpack_require__ (file:///.../.next/server/edge-runtime-webpack.js:37:33)
    at fn (file:///.../.next/server/edge-runtime-webpack.js:294:21)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant