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 set property 'parent' of undefined #57

Open
ranisalt opened this issue Feb 4, 2020 · 3 comments
Open

TypeError: Cannot set property 'parent' of undefined #57

ranisalt opened this issue Feb 4, 2020 · 3 comments
Labels

Comments

@ranisalt
Copy link

ranisalt commented Feb 4, 2020

This issue is happening always.

./src/css/main.css (/path/to/node_modules/css-loader/dist/cjs.js??ref--6-1!/path/to/node_modules/postcss-loader/src??postcss!./src/css/main.css)
Module build failed (from /path/to/node_modules/postcss-loader/src/index.js):
TypeError: Cannot set property 'parent' of undefined
    at /path/to/src/css/components/sidebar.css:1:1
    at Rule.removeChild (/path/to/node_modules/postcss-import/node_modules/postcss/lib/container.js:584:30)
    at /path/to/node_modules/postcss-rtl/lib/index.js:186:14
    at Array.forEach (<anonymous>)
    at /path/to/node_modules/postcss-rtl/lib/index.js:183:16
    at /path/to/node_modules/postcss-loader/node_modules/postcss/lib/container.js:135:18
    at Root.each (/path/to/node_modules/postcss-loader/node_modules/postcss/lib/container.js:101:16)
    at Root.walk (/path/to/node_modules/postcss-loader/node_modules/postcss/lib/container.js:131:17)
    at /path/to/node_modules/postcss-rtl/lib/index.js:147:7
    at LazyResult.run (/path/to/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:295:14)
    at LazyResult.asyncTick (/path/to/node_modules/postcss-loader/node_modules/postcss/lib/lazy-result.js:208:26)

My webpack config with postcss support is:

module.exports = {
 module: {
  rules: [
   {
    test: /\.css$/,
    use: [
     'style-loader',
     { loader: 'css-loader', options: { importLoaders: 1 } },
     {
      loader: 'postcss-loader',
      options: {
       ident: 'postcss',
       plugins: [
        require('postcss-import'),
        require('precss'),
        require('postcss-rtl'),
        require('tailwindcss'),
        require('autoprefixer'),
       ],
      },
     },
    ],
   },
  ],
 },
}

formwrapper.css is:

.forgot-password {
	@apply m-5 w-full px-16 py-6;
	max-width: 48rem;

	@screen mobile {
		@apply px-3 py-6;
	}

	.controls {
		@apply my-5 text-xs leading-snug;
	}

	.label {
		@screen tablet {
			& + .input {
				@apply mt-3;
			}
		}

		@screen mobile {
			@apply hidden;
		}
	}
}
@vkalinichev vkalinichev self-assigned this Feb 6, 2020
@vkalinichev vkalinichev added the bug label Feb 6, 2020
@vkalinichev
Copy link
Owner

@ranisalt cannot reproduce. Can you share a minimal reproducible example?

@yuvalyacoby
Copy link

@vkalinichev we also having this issue, it is planned to be addressed ?

@vkalinichev vkalinichev removed their assignment Aug 20, 2023
@rraammiinn
Copy link

I think it's because of nested css .

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

No branches or pull requests

4 participants