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

windows error #24

Closed
MathieuPuech opened this issue Jan 12, 2021 · 4 comments · Fixed by #27
Closed

windows error #24

MathieuPuech opened this issue Jan 12, 2021 · 4 comments · Fixed by #27

Comments

@MathieuPuech
Copy link
Contributor

When doing rocket start on a windows machine, this error is thrown:

Error with passthrough copy: (more in DEBUG output)
> Having trouble copying './docs/**/*.{png,gif,jpg,jpeg,svg,css,xml,json,js}'

`TemplatePassthroughManagerCopyError` was thrown
> Error copying passthrough files: Destination is not in the site output directory. Check your passthrough paths.

`TemplatePassthroughError` was thrown
> Destination is not in the site output directory. Check your passthrough paths.

`TemplatePassthroughError` was thrown:
    TemplatePassthroughError: Destination is not in the site output directory. Check your passthrough paths.
        at TemplatePassthrough.copy (C:\Users\mpuech\my-project\node_modules\@11ty\eleventy\src\TemplatePassthrough.js:93:7)

Issue seems to come from

outputDevDir: path.resolve('_site-dev'),

Eleventy may not want a windows path.resolve path to work.

If I add in the rocket.config.mjs outputDevDir: '_site-dev', another error is thrown (maybe not related?):

rocket start
Problem writing Eleventy templates: (more in DEBUG output)
> Input buffer has corrupt header: glib: XML parse error: Error domain 1 code 64 on line 6 column 56 of data: XML declaration allowed only at the start of the document

`Error` was thrown:
    Error: Input buffer has corrupt header: glib: XML parse error: Error domain 1 code 64 on line 6 column 56 of data: XML declaration allowed only at the start of the document



Copied 37 files / Wrote 0 files in 0.96 seconds (v0.11.1)
(node:36736) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'items' of undefined
    at RocketCli.update (file:///C:/Users/mpuech/my-project/node_modules/@rocket/cli/src/RocketCli.js:176:69)
    at RocketEleventy.write (file:///C:/Users/mpuech/my-project/node_modules/@rocket/cli/src/RocketCli.js:40:28)
    at async RocketEleventy.watch (C:\Users\mpuech\my-project\node_modules\@11ty\eleventy\src\Eleventy.js:650:5)

Steps to reproduce on a windows machine (without WSL)

It's the same steps described in the current getting started page.

mkdir my-project
cd my-project
npm init -y
npm install --save-dev @rocket/cli @rocket/launch

Add .gitignore file with:

node_modules/**
/docs/_assets
/docs/_includes
/docs/_data

Add docs/index.md file with:

# Welcome to your Rocket site

Text here, like any markdown file.
npx rocket start
@MathieuPuech
Copy link
Contributor Author

As I was thinking, the second error is not related, it's only because I don't have docs/_assets/logo.svg. The error is not very clear.

@MathieuPuech
Copy link
Contributor Author

Another windows issue is the navigation is not generated. It seems to be because path.sep is used (on windows path.sep is \ which is not the url path separator.

See here:

const parts = data.page.filePathStem.split(path.sep);

@daKmoR
Copy link
Member

daKmoR commented Jan 13, 2021

thank you sooo much for looking into that 🙇‍♂️

I addressed your remarks here #27

can you try the newest versions 🙏

maybe it works - maybe there are new errors 😅

will need to invest some time to enable windows in the ci

@MathieuPuech
Copy link
Contributor Author

It seems to work, that's perfect, I will reopen an issue if see something

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

Successfully merging a pull request may close this issue.

2 participants