Giter Site home page Giter Site logo

Version 2.2.0 and 2.2.2 break webpack build (Module build failed: TypeError: Invalid PostCSS Plugin found: [0]) about cosmiconfig HOT 20 CLOSED

cosmiconfig avatar cosmiconfig commented on May 29, 2024 1
Version 2.2.0 and 2.2.2 break webpack build (Module build failed: TypeError: Invalid PostCSS Plugin found: [0])

from cosmiconfig.

Comments (20)

maksimr avatar maksimr commented on May 29, 2024 3

@sudo-suhas Thanks,

The problem has gone

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024 2

@pcourt, @maksimr Could you please update your postcss-loader to 1.3.3 and check again? That should fix the issue.

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

Hey @maksimr can you please help me reproduce this issue? I ran all tests in michael-ciniawsky/postcss-load-plugins as well as michael-ciniawsky/postcss-load-config and no issues were found.
While I am not 100% sure that this cannot cause an issue, the change in 2.2.2 is just a bug fix.

from cosmiconfig.

maksimr avatar maksimr commented on May 29, 2024

@sudo-suhas sure, I will try to reproduce this problem in a sandbox(gist).

I think this commit leads to the problem

Thanks

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

I think this commit leads to the problem

This has not been released in 2.2.2. These changes will be rolled out in a major version along with some other code refactoring. Additionally, the issue in 2.2.0 was also identified and fixed.

from cosmiconfig.

pcourt avatar pcourt commented on May 29, 2024

Same issue here, no problems with 2.2.1 but 2.2.2 breaks our build.

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

@pcourt Could you please share more information about your specific setup and the stack trace for the error?

from cosmiconfig.

pcourt avatar pcourt commented on May 29, 2024
npm run build
ERROR in ../~/css-raw-loader!../~/postcss-loader!../~/normalize.css/normalize.css
Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:32:17
    at Array.forEach (native)
    at plugins (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-config\index.js:64:18
 @ ../~/normalize.css/normalize.css 4:14-96
 @ ./index.ts
 @ multi ./index.ts

ERROR in ../~/css-raw-loader!../~/postcss-loader!../~/stylus-loader!./index.styl
Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:32:17
    at Array.forEach (native)
    at plugins (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-config\index.js:64:18
 @ ./index.styl 4:14-158
 @ ./index.ts
 @ multi ./index.ts

ERROR in ../~/css-raw-loader!../~/postcss-loader!../~/stylus-loader!./components/toast/index.styl
Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:32:17
    at Array.forEach (native)
    at plugins (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-config\index.js:64:18
 @ ./components/toast/index.styl 4:14-176
 @ ./components/toast/toast.tsx
 @ ./components/toast/index.ts
 @ ./layouts/main.tsx
 @ ./index.ts
 @ multi ./index.ts

ERROR in ./components/toast/index.styl
Module build failed: ModuleBuildError: Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:32:17
    at Array.forEach (native)
    at plugins (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-config\index.js:64:18
    at runLoaders (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\webpack\lib\NormalModule.js:192:19)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\loader-runner\lib\LoaderRunner.js:364:11
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\loader-runner\lib\LoaderRunner.js:230:18
    at context.callback (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-loader\index.js:137:13

ERROR in D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\extract-text-webpack-plugin\loader.js??ref--2-0!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\style-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\css-raw-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\stylus-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\src\components\toast\index.styl doesn't export content

ERROR in ./index.styl
Module build failed: ModuleBuildError: Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:32:17
    at Array.forEach (native)
    at plugins (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-config\index.js:64:18
    at runLoaders (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\webpack\lib\NormalModule.js:192:19)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\loader-runner\lib\LoaderRunner.js:364:11
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\loader-runner\lib\LoaderRunner.js:230:18
    at context.callback (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-loader\index.js:137:13

ERROR in D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\extract-text-webpack-plugin\loader.js??ref--2-0!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\style-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\css-raw-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\stylus-loader\index.js!D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\src\index.styl doesn't export content
Child extract-text-webpack-plugin:
        + 1 hidden modules

    ERROR in ../~/css-raw-loader!../~/postcss-loader!../~/stylus-loader!./components/toast/index.styl
    Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
        at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:32:17
        at Array.forEach (native)
        at plugins (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
        at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-config\index.js:64:18
Child extract-text-webpack-plugin:
       [0] ../~/css-raw-loader!../~/postcss-loader!../~/stylus-loader!./index.styl 547 bytes {0} [built] [failed] [1 error]

    ERROR in ../~/css-raw-loader!../~/postcss-loader!../~/stylus-loader!./index.styl
    Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
        at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:32:17
        at Array.forEach (native)
        at plugins (D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-plugins\lib\plugins.js:21:15)
        at D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\postcss-load-config\index.js:64:18

npm list
+-- @types/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
+-- @types/[email protected]
| `-- @types/[email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | +-- [email protected]
| |   | | `-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | | `-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | |   `-- [email protected]
|   | `-- [email protected]
|   +-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   | `-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | |   +-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | +-- [email protected]
|   | | `-- [email protected]
|   | |   `-- [email protected]
|   | +-- [email protected]
|   | +-- [email protected]
|   | | +-- [email protected]
|   | | `-- [email protected]
|   | |   `-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | |   +-- [email protected]
|   | |   | +-- [email protected]
|   | |   | | +-- [email protected]
|   | |   | | `-- [email protected]
|   | |   | +-- [email protected]
|   | |   | | `-- [email protected]
|   | |   | `-- [email protected]
|   | |   |   `-- [email protected]
|   | |   +-- [email protected]
|   | |   +-- [email protected]
|   | |   | `-- [email protected]
|   | |   +-- [email protected]
|   | |   +-- [email protected]
|   | |   `-- [email protected]
|   | `-- [email protected]
|   |   `-- [email protected]
|   |     `-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | +-- [email protected]
|   | | `-- [email protected]
|   | `-- [email protected]
|   |   +-- [email protected]
|   |   `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | `-- [email protected]
|   |   +-- [email protected]
|   |   | +-- [email protected]
|   |   | | `-- [email protected]
|   |   | +-- [email protected]
|   |   | +-- [email protected]
|   |   | +-- [email protected]
|   |   | +-- [email protected]
|   |   | +-- [email protected]
|   |   | +-- [email protected]
|   |   | `-- [email protected]
|   |   +-- [email protected]
|   |   | `-- [email protected]
|   |   |   +-- [email protected]
|   |   |   +-- [email protected]
|   |   |   +-- [email protected]
|   |   |   `-- [email protected]
|   |   `-- [email protected]
|   +-- [email protected]
|   `-- [email protected]
+-- [email protected]
| +-- [email protected]
| `-- [email protected]
+-- [email protected]
+-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | `-- [email protected]
| | | |   `-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | | +-- [email protected]
| |   | | | +-- [email protected]
| |   | | | `-- [email protected]
| |   | | `-- [email protected]
| |   | +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   +-- [email protected]
| |   |   | +-- [email protected]
| |   |   | | `-- [email protected]
| |   |   | |   +-- [email protected]
| |   |   | |   +-- [email protected]
| |   |   | |   `-- [email protected]
| |   |   | |     +-- [email protected]
| |   |   | |     | `-- [email protected]
| |   |   | |     `-- [email protected]
| |   |   | +-- [email protected]
| |   |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   +-- [email protected]
| |   |   +-- [email protected]
| |   |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   | +-- [email protected]
| |   |   | | `-- [email protected]
| |   |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   | +-- [email protected]
| |   |   | `-- [email protected]
| |   |   `-- [email protected]
| |   |     +-- [email protected]
| |   |     `-- [email protected]
| |   +-- [email protected]
| |   +-- UNMET OPTIONAL DEPENDENCY fsevents@^1.0.0
| |   +-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| |     `-- [email protected]
| +-- [email protected]
| | `-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | `-- [email protected]
|   |   `-- [email protected]
|   |     `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | `-- [email protected]
|   |   `-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | | +-- [email protected]
|   | | `-- [email protected]
|   | |   `-- [email protected]
|   | `-- [email protected]
|   |   +-- [email protected]
|   |   | `-- [email protected]
|   |   |   `-- [email protected]
|   |   +-- [email protected]
|   |   | +-- [email protected]
|   |   | +-- [email protected]
|   |   | | `-- [email protected]
|   |   | `-- [email protected]
|   |   |   +-- [email protected]
|   |   |   | `-- [email protected]
|   |   |   `-- [email protected]
|   |   `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   | +-- [email protected]
|   | `-- [email protected]
|   |   `-- [email protected]
|   +-- [email protected]
|   +-- [email protected]
|   `-- [email protected]
|     `-- [email protected]
`-- [email protected]

package.json
{
  "name": "darva-osra-client",
  "private": true,
  "scripts": {
    "start": "yarn run watch",
    "build": "webpack --config build/webpack.dev.js",
    "watch": "webpack --config build/webpack.dev.js --watch ",
    "build-prod": "webpack --config build/webpack.prod.js",
    "watch-prod": "webpack --config build/webpack.prod.js --watch"
  },
  "devDependencies": {
    "@types/clipboard": "1.5.31",
    "@types/es6-promise": "0.0.32",
    "@types/googlemaps": "3.25.39",
    "@types/node": "6.0.48",
    "@types/react": "0.14.57",
    "@types/react-dom": "0.14.18",
    "@types/whatwg-fetch": "0.0.32",
    "awesome-typescript-loader": "3.1.2",
    "css-loader": "0.25.0",
    "css-raw-loader": "0.1.1",
    "cssnano": "3.9.1",
    "extract-text-webpack-plugin": "2.1.0",
    "postcss-flexbugs-fixes": "2.1.0",
    "postcss-loader": "1.2.1",
    "style-loader": "0.13.1",
    "stylus": "0.54.5",
    "stylus-loader": "3.0.1",
    "tslint": "4.5.1",
    "tslint-loader": "3.4.3",
    "typescript": "2.2.2",
    "webpack": "2.3.2",
    "whatwg-fetch": "2.0.3"
  },
  "dependencies": {
    "abyssa": "8.0.5",
    "classnamer": "3.1.2",
    "clipboard": "1.6.0",
    "date-fns": "1.28.2",
    "fluxx": "0.14.14",
    "immupdate": "0.4.0",
    "normalize.css": "5.0.0",
    "react": "15.4.0",
    "react-dom": "15.4.0"
  }
}

Edited for formatting

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

@pcourt Could you add a log statement at this line - michael-ciniawsky/postcss-load-config/index.js#L62 inside your node_modules and print the config plus options with console.log(JSON.stringify(config, null, 2)) and console.log(JSON.stringify(options, null, 2))?

from cosmiconfig.

pcourt avatar pcourt commented on May 29, 2024

I get nothing with console.log(JSON.stringify(config, null, 2)) and console.log(JSON.stringify(options, null, 2)).
Here's the result with

console.log(config)
{ context: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src',
  entry: [ './index.ts' ],
  output:
   { filename: 'orientation.js',
     path: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\webapp\\public' },
  module: { loaders: [ [Object], [Object], [Object] ] },
  resolve:
   { modules:
      [ 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src',
        'lib',
        'node_modules' ],
     extensions: [ '.js', '.ts', '.tsx' ] },
  plugins: [ ExtractTextPlugin { filename: 'orientation.css', id: 6, options: {} } ],
  devtool: 'source-map',
  cwd: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation',
  env: 'development',
  webpack:
   { version: 2,
     emitWarning: [Function: emitWarning],
     emitError: [Function: emitError],
     exec: [Function: exec],
     resolve: [Function: resolve],
     resolveSync: [Function: resolveSync],
     emitFile: [Function: emitFile],
     options: { output: [Object] },
     webpack: true,
     sourceMap: true,
     _module:
      NormalModule {
        dependencies: [],
        blocks: [],
        variables: [],
        context: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src',
        reasons: [],
        debugId: 1943,
        lastId: null,
        id: null,
        portableId: null,
        index: null,
        index2: null,
        depth: null,
        used: null,
        usedExports: null,
        providedExports: null,
        chunks: [],
        warnings: [],
        dependenciesWarnings: [],
        errors: [],
        dependenciesErrors: [],
        strict: false,
        meta: {},
        request: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\css-raw-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\postcss-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\stylus-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src\\index.styl',
        userRequest: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\css-raw-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\postcss-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\stylus-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src\\index.styl',
        rawRequest: '!!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\css-raw-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\postcss-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\node_modules\\stylus-loader\\index.js!D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src\\index.styl',
        parser: [Object],
        resource: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src\\index.styl',
        loaders: [Object],
        fileDependencies: [],
        contextDependencies: [],
        error: null,
        _source: null,
        assets: {},
        built: true,
        _cachedSource: null,
        issuer: null,
        useSourceMap: true,
        building: [Object],
        buildTimestamp: 1500899273685,
        cacheable: false },
     _compilation:
      Compilation {
        _plugins: [Object],
        compiler: [Object],
        resolvers: [Object],
        inputFileSystem: [Object],
        options: [Object],
        outputOptions: [Object],
        bail: false,
        profile: false,
        performance: [Object],
        mainTemplate: [Object],
        chunkTemplate: [Object],
        hotUpdateChunkTemplate: [Object],
        moduleTemplate: [Object],
        entries: [Object],
        preparedChunks: [Object],
        entrypoints: {},
        chunks: [],
        namedChunks: {},
        modules: [Object],
        _modules: [Object],
        cache: [Object],
        records: {},
        nextFreeModuleIndex: undefined,
        nextFreeModuleIndex2: undefined,
        additionalChunkAssets: [],
        assets: {},
        errors: [],
        warnings: [],
        children: [],
        dependencyFactories: [Object],
        dependencyTemplates: [Object],
        fileTimestamps: {},
        contextTimestamps: {},
        name: 'extract-text-webpack-plugin',
        compilationDependencies: [] },
     _compiler:
      Compiler {
        _plugins: [Object],
        outputPath: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\webapp\\public',
        outputFileSystem: null,
        inputFileSystem: [Object],
        recordsInputPath: null,
        recordsOutputPath: null,
        records: {},
        fileTimestamps: {},
        contextTimestamps: {},
        resolvers: [Object],
        parser: [Object],
        options: [Object],
        name: 'extract-text-webpack-plugin',
        parentCompilation: [Object] },
     fs:
      CachedInputFileSystem {
        fileSystem: NodeJsInputFileSystem {},
        _statStorage: [Object],
        _readdirStorage: [Object],
        _readFileStorage: [Object],
        _readJsonStorage: [Object],
        _readlinkStorage: [Object],
        _stat: [Function: bound bound ],
        _statSync: [Function: bound bound ],
        _readdir: [Function: bound readdir],
        _readdirSync: [Function: bound readdirSync],
        _readFile: [Function: bound bound readFile],
        _readFileSync: [Function: bound bound ],
        _readJson: [Function: bound ],
        _readJsonSync: [Function: bound ],
        _readlink: [Function: bound bound ],
        _readlinkSync: [Function: bound bound ] },
     'D:\Appsdev\Matrice-Dev\Workspaces\darva-osra\osra\client\orientation\node_modules\extract-text-webpack-plugin': false,
     target: 'web',
     loadModule: [Function: loadModule],
     context: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src',
     loaderIndex: 1,
     loaders: [ [Object], [Object], [Object] ],
     resourcePath: 'D:\\Appsdev\\Matrice-Dev\\Workspaces\\darva-osra\\osra\\client\\orientation\\src\\index.styl',
     resourceQuery: '',
     async: [Function: async],
     callback: [Function],
     cacheable: [Function: cacheable],
     addDependency: [Function: addDependency],
     dependency: [Function: addDependency],
     addContextDependency: [Function: addContextDependency],
     getDependencies: [Function: getDependencies],
     getContextDependencies: [Function: getContextDependencies],
     clearDependencies: [Function: clearDependencies],
     resource: [Getter/Setter],
     request: [Getter],
     remainingRequest: [Getter],
     currentRequest: [Getter],
     previousRequest: [Getter],
     query: [Getter],
     data: [Getter] } }
console.log(options)
{ rcExtensions: true }

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

@pcourt This is very weird. The config variable holds the webpack config!! And that is why the error is being thrown because webpack plugins are being fed to postcss-load-plugins. I am suspecting that this is not a cosmiconfig issue. I am sorry to keep bothering you but could you revert the changes made to cosmiconfig/lib/createExplorer.js in 8a50c87 and try the same build? I'd be very surprised if that fixes it.

Edit: Log the file/result.filepath as well please

from cosmiconfig.

pcourt avatar pcourt commented on May 29, 2024

@sudo-suhas reverting 8a50c87 did fix the issue ๐Ÿ˜„

from cosmiconfig.

maksimr avatar maksimr commented on May 29, 2024

and --config flag are respected.

Looks like a clash(conflict) with webpack's --config parameter?
https://webpack.github.io/docs/cli.html#configuration-file-config-example-config-js

@pcourt thanks!!

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

That makes a lot of sense! @davidtheclark Any ideas as to how we could mitigate this?
How about we make a PR to postcss-load-config to lock down the version for cosmiconfig and separate the functionality for usage from cli and through require?

from cosmiconfig.

davidtheclark avatar davidtheclark commented on May 29, 2024

This is what the argv option is meant to address. We could change it to false by default.

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

This is what the argv option is meant to address

I should have read the readme more carefully ๐Ÿ™‡.

We could change it to false by default.

This would be a breaking change and a major release. Instead, I have made a PR for setting the argv option to false - postcss/postcss-load-config#100

from cosmiconfig.

pcourt avatar pcourt commented on May 29, 2024

@sudo-suhas you're right, no more issue with postcss-loader 1.3.3 ! Thank you for your help :)

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

Cheers!

from cosmiconfig.

sudo-suhas avatar sudo-suhas commented on May 29, 2024

Closing issue as updating postcss-loader to 1.3.3 solves the issue.

from cosmiconfig.

ImAbhishekTomar avatar ImAbhishekTomar commented on May 29, 2024

Same issue with Vue.js

"postcss-loader": "^2.0.8",
"vue": "^2.5.2"

Error

Error loading PostCSS config: Invalid PostCSS Plugin found: [0]

 @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-7ba5bd90","scoped":false,"hasInlineConfig":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-296 13:3-17:5 14:22-304
 @ ./src/App.vue
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

.postcssrc.js


module.exports = {
  "plugins": {
    "tailwindcss": {},
    "autoprefixer": {},
    "postcss-import": {},
    "postcss-url": {},
    // to edit target browsers: use "browserslist" field in package.json 
  }
}

from cosmiconfig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.