Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Issue #717 with nested basepath causes "EISDIR: illegal operation on a directory" #728

Closed
ludwigschubert opened this issue Jun 6, 2019 · 5 comments
Labels

Comments

@ludwigschubert
Copy link

ludwigschubert commented Jun 6, 2019

When specifying a nested basepath (/nested/basepath) in the middleware config in server.js and as an argument to sapper export, the export fails with:

> Crawling http://localhost:3000/nested/basepath/
       9 B   (404)
> EISDIR: illegal operation on a directory, open '/Users/ludwig/code/sapper-template/__sapper__/export/nested/basepath'

This may be related to @Conduitry 's #717. I can reproduce by following the instructions for base paths from the docs. (See this fork if needed.) I only observe this behavior for basepaths with more than one level.

I'd love to help this get fixed—lmk if there's something specific I can do to help! :-)

@Conduitry Conduitry added the bug label Jun 8, 2019
@Conduitry
Copy link
Member

It looks like this issue isn't specific to exporting. npm run dev returns a 404 for http://localhost:3000/nested/basepath/ as does running the build produced by npm run build.

@Conduitry
Copy link
Member

Part of this is a Polka issue - lukeed/polka#36 - which has been fixed in that project's latest prereleases - but there is some other stuff going on as well it seems like.

@Conduitry
Copy link
Member

I was making a dumb mistake, I don't think there's another bug going on anymore.

@ludwigschubert Can you try this again, upgrading Polka to 1.0.0-next.4?

@timbarclay
Copy link

I'm having this issue too with even a single base path, not just nested ones. I've tried updating Polka to 1.0.0-next.4 but doesn't seem to make any difference. I only get the issue when using npm run export.

My repo is at https://gitlab.com/timbarclay/ayreon-browser though it's basically just the sapper scaffold project with the basepath changed so I can get it to work with Gitlab pages.

@timbarclay
Copy link

Ah, I've just re-read the OP and looked again at the docs. It seems like adding the --basepath argument to sapper export does the trick. So no problem here after all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants