[ERROR] Assets installation seems to have failed. Directory /srv/webapp/cm2/app/sprinkles/core/assets/vendor/* is empty, but it shouldn’t be


#1

Hi i’m new here…
I’ve installed UserFrosting but i’ve an error at the end:

Testing assets installation
---------------------------
 [ERROR] Assets installation seems to have failed. Directory
         '/srv/webapp/cm2/app/sprinkles/core/assets/vendor/*' is empty, but it
         shouldn't be. Check the above log for any errors.

Some help?


#2

I had something similar happen when using a VM that was too small. The “composer install” step failed and I didn’t catch it.


#3

What do you mean as “too small” ?
My VM is Ubuntu 17.10 1 Gb ram, 40 Gb HD 80% free


#4

Looking at the Going Live section it says a 512MB droplet should be sufficient. I’m using one of those and I had errors during the “compose install” step. I assumed that it was a RAM problem but that doesn’t seem to be the case. I also need to investigate why it fails.


#5

@cherry314159 If Composer is failing due to insufficient memory, you should set up a swap file.

However, @blondie63’s problem is not with Composer packages, but with Bower packages (notice that assets/vendor/ is empty) - this is where Bower puts its packages. @blondie63, can you try running npm run uf-assets-install manually?


#6

Trying to run manually i’ve errors, see below !
But another question is: because cmd “php bakery bake” fail, i’ve to restart it ? and what happen on DB ?

LOG of "npm run uf-assets-install"
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’,
1 verbose cli ‘/usr/local/bin/npm’,
1 verbose cli ‘run’,
1 verbose cli ‘uf-assets-install’ ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: ENOENT: no such file or directory, open '/srv/webapp/cm2/package.json’
5 verbose cwd /srv/webapp/cm2
6 verbose Linux 4.13.0-17-generic
7 verbose argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” "uf-assets-install"
8 verbose node v9.2.0
9 verbose npm v5.5.1
10 error path /srv/webapp/cm2/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/srv/webapp/cm2/package.json’
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -2, true ]


#7

Did you run that command from within the build/ directory? That is where package.json is located.

The next time you run bake, it will skip the database setup if it sees that all of the migrations have already been successfully run.


#8

Running cmd npm run uf-assets-install inside build folder it works
But running again cmd php bakery bake to conclude installation it fail with:
[ERROR] Assets installation seems to have failed. Directory
/srv/webapp/cm2/app/sprinkles/core/assets/vendor/* is empty, but it
shouldn’t be. Check the above log for any errors.

But… someone have completed an installation of userfronting ? :roll_eyes:


#9

Nope, no one ever. Everyone is just really into using a framework that can’t actually be installed.

So, is /srv/webapp/cm2/app/sprinkles/core/assets/vendor/* actually empty?


#10

nice irony… I have read the requirements of this project and I am trying to install it following the guide…
so, /srv/webapp/cm2/app/sprinkles/core/assets/vendor/ does’nt exist now on my server…


#11

:grin:

My guess is that something has changed in one of the npm package requirements (e.g., someone made a breaking change in one of our dependencies). We’ll look into this and see if we can figure out what’s gone wrong.


#12

Can you try pulling the hotfix branch for now, and see if that lets you run php bakery build-assets?


#13

Similar problem with hotfix !
Composer install works fine but:

php bakery build-assets

UserFrosting’s Assets Builder

Installing npm dependencies

npm install
npm WARN deprecated [email protected]: …psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
npm WARN deprecated [email protected]: breaking changes from clean-css 4.x. Please install gulp-clean-css 3.x
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use ‘npm ls graceful-fs’ to find it in the tree.
npm notice created a lockfile as package-lock.json. You should commit this file.
added 484 packages in 10.514s

Installing assets bundles

npm run uf-assets-install

@userfrosting/[email protected] uf-assets-install /srv/webapp/cm2/build
gulp bower-install

[09:13:33] Using gulpfile /srv/webapp/cm2/build/gulpfile.js
[09:13:33] Starting ‘bower-install’…
bower.json found in ‘core’ Sprinkle, installing assets.
bower ESUDO Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you’re having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option
bower.json found in ‘core’ Sprinkle, installing assets.
bower ESUDO Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you’re having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option
bower.json found in ‘account’ Sprinkle, installing assets.
bower ESUDO Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you’re having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option
[09:13:35] Finished ‘bower-install’ after 1.06 s

Testing assets installation

[ERROR] Assets installation seems to have failed. Directory
/srv/webapp/cm2/app/sprinkles/core/assets/vendor/* is empty, but it
shouldn’t be. Check the above log for any errors.


#14

Those warnings are normal - we are in the process of moving away from Bower.

At any rate, we’ve got a new release out. Can you try just reinstalling with the latest release (v4.1.14)?


#15

Err rather, v4.1.15?


#16

I’ve tried this 4.1.15 (alfa ?)
and:

(truncated for readability, see error messages above)


#17

Ok, it sounds like you are running everything as root user, which is a bad idea in general. This is also what is causing Bower to fail. The relevant part of your dump is:

bower ESUDO Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you’re having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

So, you need to create a non-root user and run bakery under that account.


#18

i’m installing on internal test VM so no security problems…
Anyway i’ll try with non sudo user…


#19

Yes, but unfortunately Bower doesn’t know that :frowning:


#20

yes, but you can tell bower to accept root:

just add in sprinkle/core and sprinkles/account one file

.bowerrc

and put in: { “allow_root”: true }

that´s all.