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

Hugo errors out with symlinks not allowed in this filesystem #74

Closed
lobopraveen opened this issue Aug 9, 2020 · 4 comments
Closed

Hugo errors out with symlinks not allowed in this filesystem #74

lobopraveen opened this issue Aug 9, 2020 · 4 comments
Assignees
Labels

Comments

@lobopraveen
Copy link
Owner

lobopraveen commented Aug 9, 2020

upgrading Hugo from 0.62.2 to 0.74.3 broke the build with the following error:

[praveenlobo.com]$ hugo server
Built in 904 ms
Error: Error copying static files: symlinks not allowed in this filesystem

Some version after the 0.62.2 is not allowing the symlinks that is employed to de-duplicate the static content.

@lobopraveen lobopraveen added the bug label Aug 9, 2020
@lobopraveen lobopraveen self-assigned this Aug 9, 2020
@lobopraveen
Copy link
Owner Author

Project developer says that symlink handling has changed in 0.56.0. I'm not sure if it is what is causing the issue here because the symlinks worked just fine in 0.62.2

@lobopraveen
Copy link
Owner Author

lobopraveen commented Aug 10, 2020

This issue was fixed by using mounts module to mount the directory instead of symlinking it. You can refer to the commit 0bd4ae8.

[module]
    [[module.mounts]]
        source = "docs/media"
        target = "static/media"

@lobopraveen
Copy link
Owner Author

Mounts module ignores the content already present in the static directory which is causing even bigger issues! Reopening....

@phxnsharp
Copy link

phxnsharp commented Aug 8, 2023

In case others find this issue, the answer is that as soon as you have a module mount into static, it ignores the staticDir directive. But you can re-create the necessary mounts yourself:

[module]
    [[module.mounts]]
        source = "docs/media"
        target = "static/media"
    [[module.mounts]]
        source = "static"
        target = "static"

You can also use the hugo config mounts command to understand what it is doing.

Chouhartem added a commit to Chouhartem/ergol that referenced this issue Mar 2, 2024
Chouhartem added a commit to Chouhartem/ergol that referenced this issue Mar 2, 2024
It has been done to have better `watch` of `assets` in hugo (Javascript
components)

- lobopraveen/praveenlobo.com#74
  - Especially lobopraveen/praveenlobo.com#74 (comment)

As well as a fix to the following error:
```
Error: Error copying static files: symlinks not allowed in this filesystem
```
Chouhartem added a commit to Chouhartem/ergol that referenced this issue Mar 2, 2024
It has been done to have better `watch` of `assets` in hugo (Javascript
components)

- lobopraveen/praveenlobo.com#74
  - Especially lobopraveen/praveenlobo.com#74 (comment)

As well as a fix to the following error (Nuclear-Squid#90):
```
Error: Error copying static files: symlinks not allowed in this filesystem
```
Nuclear-Squid pushed a commit to Nuclear-Squid/ergol that referenced this issue Mar 2, 2024
* hugo: remove symlink to use the mounts module

It has been done to have better `watch` of `assets` in hugo (Javascript
components)

- lobopraveen/praveenlobo.com#74
  - Especially lobopraveen/praveenlobo.com#74 (comment)

As well as a fix to the following error (#90):
```
Error: Error copying static files: symlinks not allowed in this filesystem
```

* hugo: remove missing symlinks

- `corpus/` and `layouts/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants