Open cyb456 opened 2 years ago
Hi @clemente-raposo @cyb456 could you fix it? I'm with the same problem working with version 8.2.4
Compiling ngx-chips : esm5 as esm5
Compiling ngx-chips : main as umd
Done in 84.94s.
yarn run v1.22.19
$ ng build common
Building Angular Package
------------------------------------------------------------------------------
Building entry point 'common'
------------------------------------------------------------------------------
✔ Compiling with Angular sources in Ivy full compilation mode.
✔ Bundling to FESM2015
✔ Bundling to UMD
✔ Writing package metadata
✔ Built common
------------------------------------------------------------------------------
Built Angular Package
- from: /gcoop/suitecrm/core/app/common
- to: /gcoop/suitecrm/dist/common
------------------------------------------------------------------------------
Build at: 2023-05-11T12:25:05.864Z - Time: 5664ms
Done in 8.64s.
yarn run v1.22.19
$ ng build core
Building Angular Package
------------------------------------------------------------------------------
Building entry point 'core'
------------------------------------------------------------------------------
⠸ Compiling with Angular sources in Ivy full compilation mode.events.js:377
throw er; // Unhandled 'error' event
^
Error: spawn /gcoop/suitecrm/node_modules/ng-packagr/node_modules/esbuild/bin/esbuild EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:19)
at onErrorNT (internal/child_process.js:472:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:12)
at onErrorNT (internal/child_process.js:472:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
errno: -13,
code: 'EACCES',
syscall: 'spawn /gcoop/suitecrm/node_modules/ng-packagr/node_modules/esbuild/bin/esbuild',
path: '/gcoop/suitecrm/node_modules/ng-packagr/node_modules/esbuild/bin/esbuild',
spawnargs: [ '--service=0.12.28', '--ping' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I gave up on 8 haha
Still have the same issue as of 8.30
There seems to be a problem with the permissions as documented in the SuiteCRM Docs not allowing the build process. chmod -R 777 does the thing but there needs to be a better fix
That's likely because the file ownerships are wrong. In a typical case, the files should be owned (chown) to the sam euser under which the web server executable is running. This changes from system to system.
That's likely because the file ownerships are wrong. In a typical case, the files should be owned (chown) to the sam euser under which the web server executable is running. This changes from system to system.
afaik these commands should also change the owner to the web server user (Apache in this case) but it still does not compile correctly
find . -type d -not -perm 2755 -exec chmod 2755 {} \;
find . -type f -not -perm 0644 -exec chmod 0644 {} \;
find . ! -user www-data -exec chown www-data:www-data {} \;
chmod +x bin/console
Have you confirmed if apache is running under user "www-data"?
ps -ef | grep apache
And when compiling, it's a different user (the one you use to log in), possibly, how does it get access? I would put it in the www-data group, and give accesses like this:
find . -type d -not -perm 2770 -exec chmod 2770 {} \;
find . -type f -not -perm 0660 -exec chmod 0660 {} \;
find . ! -user www-data -exec chown www-data:www-data {} \;
chmod +x bin/console
For me, that last digit is always 0, no need to give access to strangers :-)
And I prefer to have the group access equal to the user access, so I can give access to more users by putting them in the group.
thanks for the feedback confirmed apache is running under www-data added root user to the group changed access rights as suggested but still the same result i think something is really wrong with my instance
What do you get from this command?
ls -al /var/www/html/8dev/node_modules/esbuild/bin
root@ichliebesuitecrm8:/var/www/html/8dev# ls -al /var/www/html/8dev/node_modules/esbuild/bin
total 7384
drwxrws--- 2 www-data www-data 4096 Aug 6 18:28 .
drwxrws--- 4 www-data www-data 4096 Aug 6 18:27 ..
-rw-rw---- 1 www-data www-data 7553024 Aug 6 18:28 esbuild
That looks alright. You could check also all the previous directory levels, just to make sure.
But what I would really advise trying is to use another user instead of root. I am just speculating that there might be some specific handling for that user that is confusing your attempts.
Don't forget to add the other user to the www-data group and then to reapply all the permissions and run yarn again.
If that doesn't work, then I suggest googling for yarn-specific problems that mention the same - 13 error "EACCESS".
I am following the "developer install guide" found here: https://docs.suitecrm.com/8.x/developer/installation-guide/ and ran into an error
Issue
running: yarn run build-dev:core
Expected Behavior
self explanatory
Actual Behavior
self explanatory
Possible Fix
Steps to Reproduce
I followed the guide exactly, up till that command
Context
Your Environment