Coder Social home page Coder Social logo

Comments (11)

claysondesign avatar claysondesign commented on June 2, 2024 1

Have tried this now on a fresh install and Nitro 2.03 BETA

Still the same issue but webpack update and search suggests that in package.json scripts to remove the --watch to prevent further errors

Change:

"dev": "cross-env NODE_ENV=development webpack serve --watch --config ./wpconfig/webpack.dev.js",

to

"dev": "cross-env NODE_ENV=development webpack serve --config ./wpconfig/webpack.dev.js",

from craft3-webpack5-tailwind2-boilerplate.

claysondesign avatar claysondesign commented on June 2, 2024 1

Looks good. Does this solve the original "Cannot GET /" issue for you?

Still the same for me on Nitro 2.05 BETA

https://testdomain.nitro/ is fine but Webpack watch url doesn't want to know :( https://testdomain.nitro:8080/

from craft3-webpack5-tailwind2-boilerplate.

claysondesign avatar claysondesign commented on June 2, 2024

Getting the same error with a Nitro setup. Can't work out what might have changed. Build is fine.

(node:2896) [DEP_WEBPACK_WATCH_WITHOUT_CALLBACK] DeprecationWarning: A 'callback' argument need to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.

Have searched on “DEP_WEBPACK_WATCH_WITHOUT_CALLBACK” and seems to be a common problem with many potential solutions.

The webpack hot load seems flakier than Browsersync in this setup? I don’t know. Everything else here works a treat :)

from craft3-webpack5-tailwind2-boilerplate.

Bcdo avatar Bcdo commented on June 2, 2024

@claysondesign What is your approach on using this with nitro? I am new with webpack, and I want to test it with nitro, but I get the same issue as described above, and no css or tailwind working.

from craft3-webpack5-tailwind2-boilerplate.

claysondesign avatar claysondesign commented on June 2, 2024

More or less using as this repo and have tried a few amends, but it always falls over worse. All paths and assets set up .env or config/general.php seem to working well when not in dev mode.

Nitro works pretty well, but a little limited (no https). Reliant on Multipass on the Mac and apparently not M1 ready either if you’re lucky enough to go there.

If this nice little stack works on Mamp Pro or Valet that would be interesting.

from craft3-webpack5-tailwind2-boilerplate.

mizziness avatar mizziness commented on June 2, 2024

Have tried this now on a fresh install and Nitro 2.03 BETA

Still the same issue but webpack update and search suggests that in package.json scripts to remove the --watch to prevent further errors

Change:

"dev": "cross-env NODE_ENV=development webpack serve --watch --config ./wpconfig/webpack.dev.js",

to

"dev": "cross-env NODE_ENV=development webpack serve --config ./wpconfig/webpack.dev.js",

This appears to be correct - webpack-cli 4.4.0 -> 4.5.0 is where the change occurred. Update to the project coming :) Thanks!

from craft3-webpack5-tailwind2-boilerplate.

williamExitable avatar williamExitable commented on June 2, 2024

I have the same problem. When I runyarn dev and I browse to localhost:8080 I get the same message: Cannot get /
The Master repo is today installed. In the package.json I have: cross-env NODE_ENV=development webpack serve --mode development --config ./wpconfig/webpack.dev.js

from craft3-webpack5-tailwind2-boilerplate.

brambeekman avatar brambeekman commented on June 2, 2024

I have the same problem. When I runyarn dev and I browse to localhost:8080 I get the same message: Cannot get /
The Master repo is today installed. In the package.json I have: cross-env NODE_ENV=development webpack serve --mode development --config ./wpconfig/webpack.dev.js

The same here, any fix?

from craft3-webpack5-tailwind2-boilerplate.

mizziness avatar mizziness commented on June 2, 2024

@brambeekman That is because there's no index file in your dist folder - it's not required, though! The asset files are still served. If you try and load one directly, it should work. The latest release includes code and instructions on how to make it generate an index file, if you really want one.

Edit: Here's a link right to the code block you would use:
https://github.com/mizziness/craft3-webpack5-tailwind2-boilerplate/blob/main/wpconfig/webpack.common.js#L45-L54

from craft3-webpack5-tailwind2-boilerplate.

storybynumbers avatar storybynumbers commented on June 2, 2024

How are you accessing your homepage when the index file is not being generated? How do you access other templates when no files are generated in web/dist in dev mode?

from craft3-webpack5-tailwind2-boilerplate.

JonQuayle avatar JonQuayle commented on June 2, 2024

Just chipping in here as I'm also seeing the 'Cannot GET /' message. No errors in the terminal. CSS and JS is being built fine with the build command. I am however using MAMP and I'm not sure how to connect the two? Pretty confused if I'm being honest with how the template files in /templates are getting rendered with Webpack-dev-server?

from craft3-webpack5-tailwind2-boilerplate.

Related Issues (7)

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.