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

Error occured while creating symlink admin frontend build #7365

Closed
dduenker opened this issue Apr 12, 2024 · 5 comments
Closed

Error occured while creating symlink admin frontend build #7365

dduenker opened this issue Apr 12, 2024 · 5 comments
Labels
Bug Error or unexpected behavior of already existing functionality

Comments

@dduenker
Copy link

Q A
Sulu Version 2.5.14
PHP Version 8.3
DB Version irrelevant
Browser Version irrelevant

Actual Behavior

Building the admin frontend currently fails, because the command "npx symlink-dir" uses the latest release of symlink-dir.
The latest version of this requires node >= 18.12 now, whereas the sulu frontend requires node 14.

breaking change: pnpm/symlink-dir@55fd697

Expected Behavior

Building the frontend does not fail

Steps to Reproduce

Build manually as described on https://docs.sulu.io/en/latest/cookbook/build-admin-frontend.html#common-errors

Possible Solutions

pin the used symlink-dir to a version before 6.0.0

@dduenker dduenker added the Bug Error or unexpected behavior of already existing functionality label Apr 12, 2024
@cteliberty
Copy link

cteliberty commented Apr 12, 2024

This was fixed in #7364, but the test look like it's blocked

@dduenker
Copy link
Author

Thank you for the info @cteliberty , should i leave this issue open, until the change is available, or should i close it?

@cteliberty
Copy link

@alexander-schranz Is there a problem with the test? The tests seems no longer progressing.
https://github.com/sulu/sulu/actions/runs/8658836806/job/23743502513

@dduenker I don't know.

@alexander-schranz
Copy link
Member

alexander-schranz commented Apr 15, 2024

A release is planned for this days. Still you can patch the file manually to unblock it:

vendor/sulu/sulu/symlink-vendor-directory.js:

diff --git a/symlink-vendor-directory.js b/symlink-vendor-directory.js
index d33c78010f0..7c502c98d3b 100644
--- a/symlink-vendor-directory.js
+++ b/symlink-vendor-directory.js
@@ -33,7 +33,7 @@ if (
         && path.basename(path.dirname(process.cwd())) === 'assets'
     )
 ) {
-    exec('npx symlink-dir ' + from + ' ' + to, (error) => {
+    exec('npx "symlink-dir@<6.0" ' + from + ' ' + to, (error) => {
         if (error) {
             throw new Error('Error occured while creating symlink: ' + error);
         }

Unreleased version of sulu/sulu can also be installed using:

composer require sulu/sulu:"2.4.*@dev"

composer require sulu/sulu:"2.5.*@dev"

@alexander-schranz alexander-schranz changed the title Newest version of symlink-dir breaks admin frontend build Error occured while creating symlink admin frontend build Apr 15, 2024
@alexander-schranz alexander-schranz pinned this issue Apr 15, 2024
@YetiCGN
Copy link
Contributor

YetiCGN commented Apr 17, 2024

Thanks! This had me stumped for a while and I was frantically trying to update the admin JS dependencies to Node 18...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants