KonnorRogers / bridgetown-automation-tailwindcss

An automation for adding TailwindCss to a project
MIT License
9 stars 2 forks source link

Error on creating a new bridgetown proyect with this automation #7

Closed JuanVqz closed 3 years ago

JuanVqz commented 3 years ago

I tried a new project command. bridgetown new <newsite> --apply="https://github.com/ParamagicDev/bridgetown-automation-tailwindcss" Bridgetown v0.19.1 (codename "Arbor Lodge") ruby 2.7.2

[Webpack] Hash: 0c35dfc73ea9acf5948b
[Webpack] Version: webpack 4.46.0
[Webpack]                                         Asset      Size  Chunks                         Chunk Names
[Webpack] ../../../../.bridgetown-webpack/manifest.json  98 bytes          [emitted]
[Webpack]                   all.5a9b8d728ed68f516fff.js  5.87 KiB    main  [emitted] [immutable]  main
[Webpack]               all.5a9b8d728ed68f516fff.js.map  4.54 KiB    main  [emitted] [dev]        main
[Webpack] Entrypoint main = all.5a9b8d728ed68f516fff.js all.5a9b8d728ed68f516fff.js.map
[Webpack]
[Webpack] ERROR in ./frontend/styles/index.scss
[Webpack] Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
[Webpack] ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
[Webpack] Error: ENOENT: no such file or directory, open '/home/itox/Code/me/juanvqz.github.io/frontend/styles/index.scss'
[Webpack]     at /home/itox/Code/me/juanvqz.github.io/node_modules/webpack/lib/NormalModule.js:316:20
[Webpack]     at /home/itox/Code/me/juanvqz.github.io/node_modules/loader-runner/lib/LoaderRunner.js:367:11
[Webpack]     at /home/itox/Code/me/juanvqz.github.io/node_modules/loader-runner/lib/LoaderRunner.js:203:19
[Webpack]     at /home/itox/Code/me/juanvqz.github.io/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:85:15
[Webpack]     at processTicksAndRejections (internal/process/task_queues.js:75:11)
[Webpack]  @ ./frontend/javascript/index.js 1:0-20
[Bridgetown]       Regenerating...
[Bridgetown]                     1 file(s) changed at 2021-02-02 23:21:48
[Bridgetown]                     .bridgetown-webpack/manifest.json
[Bridgetown]         Pagination: disabled. Enable in site config with pagination:\n enabled: true
[Bridgetown] Bridgetown::Errors::WebpackAssetError There was an error parsing your css files. Please check your css for any errors.
[Bridgetown] Bridgetown::Errors::WebpackAssetError There was an error parsing your css files. Please check your css for any errors.
[Bridgetown] Bridgetown::Errors::WebpackAssetError There was an error parsing your css files. Please check your css for any errors.
[Bridgetown] Bridgetown::Errors::WebpackAssetError There was an error parsing your css files. Please check your css for any errors.
[Bridgetown] Bridgetown::Errors::WebpackAssetError There was an error parsing your css files. Please check your css for any errors.
[Bridgetown] Bridgetown::Errors::WebpackAssetError There was an error parsing your css files. Please check your css for any errors.
[Bridgetown]             Done! 🎉 Completed in less than 0.03 seconds.
[Bridgetown]
[Live] [Browsersync] Reloading Browsers... (buffered 2 events)
CiTroNaK commented 3 years ago

Looks like the webpack.config.js here is somehow outdated. When I copy postcss-loader into the original, I still have an error :( Unfortunately, I don't have the necessary knowledge to fix it...

{
        test: /\.(s[ac]|c)ss$/,
        use: [
          MiniCssExtractPlugin.loader,
          "css-loader",
          {
            loader: "postcss-loader"
          },
          {
            loader: "sass-loader",
            options: {
              sassOptions: {
                includePaths: [
                  path.resolve(__dirname, "src/_components"),
                  path.resolve(__dirname, "src/_includes")
                ]
              }
            }
          },
        ],
      },

error

[Webpack] ERROR in ./frontend/styles/index.scss
[Webpack] Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
[Webpack] ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
[Webpack] TypeError: this.getOptions is not a function
[Webpack]     at Object.loader (/Users/Petr/Code/other/static/test/node_modules/postcss-loader/dist/index.js:38:24)
[Webpack]     at /Users/Petr/Code/other/static/test/node_modules/webpack/lib/NormalModule.js:316:20
[Webpack]     at /Users/Petr/Code/other/static/test/node_modules/loader-runner/lib/LoaderRunner.js:367:11
[Webpack]     at /Users/Petr/Code/other/static/test/node_modules/loader-runner/lib/LoaderRunner.js:233:18
[Webpack]  @ ./frontend/javascript/index.js 1:0-20
JuanVqz commented 3 years ago

no worries, I'm going to close this issue. thank you!

CiTroNaK commented 3 years ago

@JuanVqz did you solve it or lost interest? 🙂

CiTroNaK commented 3 years ago

postcss-loader in the latest version (5.X.X) requires a newer Webpack. I switched to 4.2.0 and it works.

JuanVqz commented 3 years ago

@CiTroNaK I did the same!!!

KonnorRogers commented 3 years ago

Hey sorry guys I totally missed this I'm so sorry! My GH notifications are a mess! Glad you guys managed to get this solved!