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

Module build failed: TypeError: Invalid PostCSS Plugin found: [2] #58

Closed
SimonCheung1989 opened this issue May 4, 2017 · 7 comments
Closed

Comments

@SimonCheung1989
Copy link

Hi, my postcss.config.js like this

module.exports = {
    plugins: [
        require('postcss-sassy-mixins'),
        require('postcss-nested'),
        require('postcss-scss'),
        require('precss'),
        require('autoprefixer')
    ]
}

But got this error message


Child extract-text-webpack-plugin:

    ERROR in ./~/css-loader!./~/postcss-loader!./src/styles/index.scss
    Module build failed: TypeError: Invalid PostCSS Plugin found: [2]
        at C:\Users\43957841\workspace_VSC\demo-app\node_modules\postcss-load-plugins\lib\plugins.js:32:17
        at Array.forEach (native)
        at plugins (C:\Users\43957841\workspace_VSC\demo-app\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
        at C:\Users\43957841\workspace_VSC\demo-app\node_modules\postcss-load-config\index.js:64:18
Done in 24.38s.
@ai
Copy link
Member

ai commented May 4, 2017

postcss-scss is not a plugin, you need to set it as syntax option

@ai ai closed this as completed May 4, 2017
@dave0688
Copy link

Can you please explain what I need to do in order to solve that? I'm stuck for hours on that now...

@ai
Copy link
Member

ai commented Jul 27, 2017

@dave0688

module.exports = {
+ parser: equire('postcss-scss'),
  plugins: [
        require('postcss-sassy-mixins'),
        require('postcss-nested'),
-       require('postcss-scss'),
        require('precss'),
        require('autoprefixer')
    ]
}

@dave0688
Copy link

Thanks for your help! For some reason I have another problem now...:

[ERROR]  10% building modules 1/1 modules 0 active                                                               12% bui
lding modules 20/123 modules 103 active ...modules\rxjs\add\operator\debounce.js               38% building modules 235/
282 modules 46 active ...bootstrap\ng-bootstrap\modal\modal.js                     62% building modules 436/451 modules
15 active ...ules\rxjs\observable\dom\webSocket.js        4299ms building modules
[ERROR] 19ms sealing
[ERROR] 1ms optimizing
[ERROR] 0ms basic module optimization
[ERROR] 13ms module optimization
[ERROR] 0ms advanced module optimization
[ERROR] 0ms basic chunk optimization
[ERROR] 1ms chunk optimization
[ERROR] 0ms advanced chunk optimization
[ERROR] 0ms module and chunk tree optimization
[ERROR] 19ms module reviving
[ERROR] 2ms module order optimization
[ERROR] 3ms module id optimization
[ERROR] 1ms chunk reviving
[ERROR] 0ms chunk order optimization
[ERROR] 6ms chunk id optimization
[ERROR] 39ms hashing
[ERROR] 0ms module assets processing
[ERROR] 72ms chunk assets processing
[ERROR] 1ms additional chunk assets processing
[ERROR] 0ms recording
[ERROR] 9802ms additional asset processing
[ERROR] 0ms chunk asset optimization
[ERROR] 11ms asset optimization
× { Error: stdout maxBuffer exceeded
    at Socket.onChildStdout (child_process.js:263:14)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:554:20) cmd: 'mvnw package -DskipTests=true -B -Pprod' }
Execution complete

Do you have any idea? I would need your help again I guess, I'm sorry :)

@ai
Copy link
Member

ai commented Jul 27, 2017

Have no idea :)

@dave0688
Copy link

Sorry to bother you here again, but I got massive problems starting my application out of nothing. It keeps giving me the following error:

ERROR in ./~/css-loader!./~/postcss-loader!./~/sass-loader/lib/loader.js!./src/main/webapp/content/scss/global.scss
Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
    at C:\Entwicklung\git\Coinlender\node_modules\postcss-load-plugins\lib\plugins.js:32:17
    at Array.forEach (native)
    at plugins (C:\Entwicklung\git\Coinlender\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
    at C:\Entwicklung\git\Coinlender\node_modules\postcss-loader\node_modules\postcss-load-config\index.js:64:18
 @ ./src/main/webapp/content/scss/global.scss 4:14-194 13:2-17:4 14:20-200
 @ multi (webpack)-dev-server/client?http://localhost:9060 webpack/hot/dev-server ./src/main/webapp/content/scss/global.scss

My postcss.config.js is empty (since it worked before) and I'm not familiar with the concept of PostCSS. Do you have any hint what I need to do in order to solve that? And, do I need a PostCSS plugin at all? Why does it keep searching for some postcss plugin when I have developed my application for like 6 weeks now and never had problems with that?

Can you please help me?

@ai
Copy link
Member

ai commented Jul 28, 2017

@dave0688 ask question in support chat https://gitter.im/postcss/postcss

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

3 participants