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

TypeError: Cannot read property 'whitelist' of undefined #58

Closed
StephenEsser opened this issue Feb 19, 2020 · 1 comment
Closed

TypeError: Cannot read property 'whitelist' of undefined #58

StephenEsser opened this issue Feb 19, 2020 · 1 comment
Assignees

Comments

@StephenEsser
Copy link

Summary

With the latest release of postcss-rtl v1.7.0 our application is unable to build. Reverting postcss-rtl to v1.6.0 resolves the issue. I believe the changes in this commit were non-passive. Options were previously optional and are now required.

Stack Trace

ERROR in ./node_modules/terra-dev-site/lib/loader-components/PropsTable.module.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
TypeError: Cannot read property 'whitelist' of undefined
    at css (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss-rtl/lib/index.js:37:37)
    at LazyResult.run (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss/lib/lazy-result.js:295:14)
    at LazyResult.asyncTick (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss/lib/lazy-result.js:208:26)
    at /Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss/lib/lazy-result.js:250:14
    at new Promise (<anonymous>)
    at LazyResult.async (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss/lib/lazy-result.js:246:23)
    at LazyResult.then (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss/lib/lazy-result.js:127:17)
    at Promise.resolve.then.then (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss-loader/src/index.js:142:8)
    at runLoaders (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/webpack/lib/NormalModule.js:316:20)
    at /Users/user-name/workspaces/react-on-rails/terra-application/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/user-name/workspaces/react-on-rails/terra-application/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (/Users/user-name/workspaces/react-on-rails/terra-application/node_modules/postcss-loader/src/index.js:208:9)
 @ ./node_modules/terra-dev-site/lib/loader-components/_PropsTable.js 14:47-82
 @ ./src/slide-panel-manager/SlidePanelManager.jsx?dev-site-props-table
 @ ./src/terra-dev-site/doc/application/reference.1/components/SlidePanelManager.doc.mdx
 @ ./dev-site-config/build/contentConfig.js
 @ ./dev-site-config/build/siteConfig.js
 @ ./node_modules/terra-dev-site/lib/TerraDevSite.js

Reproduction Steps

  1. Clone this project: https://github.com/cerner/terra-application
  2. Run npm install
  3. Run npm start
  4. Observe the postcss-rtl error thrown

Possible Solution

Revert the changes or default options to an empty object if undefined.

@vkalinichev vkalinichev self-assigned this Feb 19, 2020
vkalinichev added a commit that referenced this issue Feb 19, 2020
@vkalinichev
Copy link
Owner

Fixed in 1.7.1

Thanks for report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants