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

Install/Run Issues #8

Open
aaronstezycki opened this issue Oct 7, 2022 · 7 comments
Open

Install/Run Issues #8

aaronstezycki opened this issue Oct 7, 2022 · 7 comments

Comments

@aaronstezycki
Copy link

Just an FYI, currently downloading the package as is and npm install/ npm start fails.

Sorry, I don't have the time to run through the errors atm, but I was hopeful for using this starter as it seemed promising :)

@aaronstezycki
Copy link
Author

**ERROR** Failed to apply patch for package @11ty/eleventy-plugin-vite at path
  
    node_modules/@11ty/eleventy-plugin-vite

  This error was caused because @11ty/eleventy-plugin-vite has changed since you
  made the patch file for it. This introduced conflicts with your patch,
  just like a merge conflict in Git when separate incompatible changes are
  made to the same piece of code.

  Maybe this means your patch file is no longer necessary, in which case
  hooray! Just delete it!

  Otherwise, you need to generate a new patch file.

  To generate a new one, just repeat the steps you made to generate the first
  one.

  i.e. manually make the appropriate file changes, then run 

    patch-package @11ty/eleventy-plugin-vite

  Info:
    Patch file: patches/@11ty+eleventy-plugin-vite+2.0.0-canary.1.patch
    Patch was made for version: 2.0.0-canary.1
    Installed version: 2.0.0-canary.2

and

**ERROR** Failed to apply patch for package rollup-plugin-critical at path
  
    node_modules/rollup-plugin-critical

  This error was caused because rollup-plugin-critical has changed since you
  made the patch file for it. This introduced conflicts with your patch,
  just like a merge conflict in Git when separate incompatible changes are
  made to the same piece of code.

  Maybe this means your patch file is no longer necessary, in which case
  hooray! Just delete it!

  Otherwise, you need to generate a new patch file.

  To generate a new one, just repeat the steps you made to generate the first
  one.

  i.e. manually make the appropriate file changes, then run 

    patch-package rollup-plugin-critical

  Info:
    Patch file: patches/rollup-plugin-critical+1.0.8.patch
    Patch was made for version: 1.0.8
    Installed version: 1.0.9

Just looks like version bumps, but then I guess you need to check the updates themselves too.

@aaronstezycki
Copy link
Author

aaronstezycki commented Oct 9, 2022

Ignoring the above, I've managed to get it at least building... but there does seem to be a problem with vite serving assets.
It will not process SCSS files. Changing them to CSS files seems to work.
When building from a template change (i.e. base.njk), I get asset 404 errors on all assets which fail to load, site.webmanifest, js, css etc.

When adding eleventyConfig.setServerPassthroughCopyBehavior("copy"); in .eleventy.js, this seems to fix some problems.

@aaronstezycki
Copy link
Author

I've also changed the postcss nesting package from "postcss-nesting" to "postcss-nested" ... and this seems to now work.

https://github.com/postcss/postcss-nested

@mwaterous
Copy link

mwaterous commented Nov 8, 2022

@aaronstezycki Were you able to build? The dev server works with the changes you've mentioned above, but the build is generating binary CSS files. It looks like something is trying to convert them to font (WOFF) files instead of outputting text files.

edit: #7 (comment) This seems to have fixed it.

@simplerethink
Copy link

@aaronstezycki @mwaterous any chance you've tried using @11ty/eleventy-img with this starter? I can't get the images to copy over when building.

@KiwiKilian
Copy link

@simplerethink I'm using @11ty/elenty-img together with @11ty/eleventy-plugin-vite here. I didn't branch off this starter, but basically you will have to output the images into _site somewhere and make sure, the pathes are correct for vite to be picked up, I guess placing outside of _site folder will not work, because that's outside of vites' scope. My setup does some renaming so the elventy-img cache can find the files even after vite has touched them. Therefore I put the images inside _site/assets, same place vite outputs per default.

@ThePeach
Copy link

ThePeach commented Aug 6, 2023

@simplerethink I'm struggling with the same problem, I'm outputting images directly into _site/images/ folder, tried with _site/assets/images/ as @KiwiKilian suggested, with no changes in the output, that is, no images where copied over in the build process.
I'm scratching my head over this and I have not enough knowledge of Vite to mock around with the options.

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

5 participants