userfrosting / UserFrosting

Modern PHP user login and management framework

Home Page:https://www.userfrosting.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

assetsInstall problem after upgrade to 4.5.1

ktecho opened this issue · comments

I've just upgraded to UF 4.5.1 and I have a problem with the first php bakery bake after copying all the files:

Installing frontend vendor assets
---------------------------------

> npm run uf-assets-install

> @ uf-assets-install /app/build
> shell './node_modules/.bin/gulp assetsInstall'

Internal Error: Assertion failed: The execution pipeline should have been setup
    at executeCommandChain (/app/build/node_modules/@yarnpkg/shell/lib/index.js:594:15)
    at executeChain (/app/build/node_modules/@yarnpkg/shell/lib/index.js:611:26)
    at executeCommandLine (/app/build/node_modules/@yarnpkg/shell/lib/index.js:620:19)
    at executeShellLine (/app/build/node_modules/@yarnpkg/shell/lib/index.js:657:35)
    at Object.execute (/app/build/node_modules/@yarnpkg/shell/lib/index.js:793:18)
    at EntryCommand.execute (/app/build/node_modules/@yarnpkg/shell/lib/commands/entry.js:20:30)
    at EntryCommand.validateAndExecute (/app/build/node_modules/clipanion/lib/index.js:1118:37)
    at Cli.run (/app/build/node_modules/clipanion/lib/index.js:1371:38)
    at Cli.runExit (/app/build/node_modules/clipanion/lib/index.js:1388:39)
    at Object.<anonymous> (/app/build/node_modules/@yarnpkg/shell/lib/cli.js:15:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ uf-assets-install: `shell './node_modules/.bin/gulp assetsInstall'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ uf-assets-install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-28T14_19_28_578Z-debug.log


 [ERROR] assets installation has failed

I got this from the log file:

root@bc6b8a907e4a:/app# cat /root/.npm/_logs/2021-07-28T14_19_37_251Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'uf-assets-install' ]
2 info using npm@6.14.8
3 info using node@v12.19.0
4 verbose stack Error: ENOENT: no such file or directory, open '/app/package.json'
5 verbose cwd /app
6 verbose Linux 5.13.5-xanmod1-edge
7 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "uf-assets-install"
8 verbose node v12.19.0
9 verbose npm  v6.14.8
10 error code ENOENT
11 error syscall open
12 error path /app/package.json
13 error errno -2
14 error enoent ENOENT: no such file or directory, open '/app/package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -2, true ]

@Silic0nS0ldier You made the latest changes to the asset packager, right? Do you know what could be the problem? Thanks!

Might be worth a try to delete the build/node_modules directory and build/package.lock file, then run asset install (php bakery build-assets) again.

EDIT : Well poop, same thing on my side... @Silic0nS0ldier ?

Ugh. Stupid yarn package. On work hours now, I'll take a look later.

Well poop, same thing on my side

@Silic0nS0ldier Github Action are failling too now... any chance for a quick fix ? This affects 4.5 & 4.6

I had a look at the source of the failing package before, crash looks to be due to a state issue. Could be that a transitive dependency pushed out a new version, and had breaking changes. A lock file would have guarded against such a problem.

What we can try in the meantime is updating the shell package, which now has a stable release for v3.

Reproduced locally, and fixed by updating @yarnpkg/shell to v3. I'll have a PR up shortly.

@Silic0nS0ldier It works with that change in my install. I still have to do some more testing for 4.5.1, but the php bakery bake process finished and everything seems ok in the logs.

Thanks a lot and have a nice weekend!! :)

Released in 4.5.2 and 4.6.1 👍
You can update an existing 4.5 install using the 4.5 branch (master is 4.6)

Thanks a lot to both of you :)

Well poop, same thing on my side

updating @yarnpkg/shell to v3 is good

Thanks a lot to both of you :)