-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
symlink error Skipping "./index.js" listed in ".../block.json". File is located outside of the "src" directory. #44937
Comments
Thank you for submitting the issue.
|
Thanks for providing more information. How to reproduce on Windows
Skipping "./index.js" listed in "path/to/test-block-symlink/src/block-a/block.json". File is located outside of the "src" directory.
Skipping "./index.js" listed in "patj/to/test-block-symlink/src/block-b/block.json". File is located outside of the "src" directory.
No entry file discovered in the "src" directory. |
Then this is the test result on WSL (Ubuntu). This one works correctly.
Confirm that all files are generated in the build directory correctly without error messages. |
I have found one clue. gutenberg/packages/scripts/utils/config.js Lines 207 to 214 in 3c9a020
Once I do, I may need to look into how |
I encountered this problem when developing plugins on a Windows machine where the plugin code is stored in a "global" directory and symlink'd into a particular WP site.
I can confirm both of the above (using WSL (CentOS7) for the linux testing). I've looked at the PR in #54212, and have a suggestion for a simpler solution, that seems to work for me (both in Windows and linux), but there may be use cases that it doesn't account for. in
with:
@t-hamano can you confirm that this simpler solution works for you? |
@gziolo the latest PR works great for me in Windows, whether I run the scripts from the dir that is symlink'd or the target dir. thanx! |
Hi guys!
When trying to build multiple blocks I got the following error:
Some investigation led to "...@wordpress\scripts\utils\config.js" line 256:
and "...@wordpress\scripts\utils\package.js" line 12:
As a result
filepath
is the symlink path while thesrcDirectory
is the resolved path.Not sure what the reason for
realpathSync
ussage is, but I guess it should be investigated.Hope this saves someone's time. Cheers,
Tony
The text was updated successfully, but these errors were encountered: