Installed Sage 9, ran Yarn, and got many Warning messages

I installed the latest version of Sage (9.0.9) in the themes folder, chose Bootstrap as a framework, chose Yes to overwrite files, and everything seemed to be okay.

I navigated to my theme folder and ran Yarn and got these warning messages:

yarn install v1.16.0

info No lockfile found.

[1/5] Validating package.json…

[2/5] Resolving packages…

warning css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

warning css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

warning css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

warning css-loader > cssnano > postcss-minify-selectors > postcss-selector-parser > flatten@1.0.2: I wrote this module a very long time ago; you should use something else.

warning eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.

warning imagemin-mozjpeg > mozjpeg > bin-wrapper > download > gulp-decompress > gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at The Problem with gulp-util. A little postmortem | by Janiceilene | gulpjs | Medium

warning stylelint > autoprefixer > browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.

[3/5] Fetching packages…

info fsevents@1.2.9: The platform “linux” is incompatible with this module.

info “fsevents@1.2.9” is an optional dependency and failed compatibility check. Excluding it from installation.

[4/5] Linking dependencies…

warning " > stylelint-webpack-plugin@0.10.5" has incorrect peer dependency “webpack@^1.13.2 || ^2.7.0 || ^3.11.0 || ^4.4.0”.

[--------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1788Killed

I didn’t run “yarn && yarn build” as the message in the terminal suggested. Is this part of the issue?

In addition to the warning messages, I noticed that no lock file was found. I encountered this issue before when installing another package, and composer install in the package directory solved it. Can I do the same here?

Also, after installing this, I get “Error establishing a database connection” on my site’s front page. This happened before and I restarted MySQL and it solved the issue. But is this somehow related to the above issues?

Hi, @steve!

It’s not unusual to get warning messages when working with yarn. These can usually be ignored. That said you seem to be getting more warnings than usual.

Could you give us more information about the environment you are developing on? What have you tried to fix the issue?

As an aside, when you choose Bootstrap as your framework you can chose no when asked to overwrite the files (because Bootsrap is the default framework - Are you sure you want to overwrite the following files?).

Hi @silumesii,

Thank you for your reply.

I am running a LAMP stack on Ubuntu 18.04. I have a fresh install of the latest Wordpress, Node.js v10.15.3, and PHP 7.2.17.

I don’t know if this is related, but when I initially installed Composer on this test server, the process got killed. So it didn’t generate a lock file. I believe this was due to the server running out of memory. I ran composer install to fix this issue, and installed and tested a package (slugify) to make sure it worked. Everything looked good.

I have a couple things I would like to try to fix it, like doing yarn add to generate a lock file, but I actually haven’t done anything to fix it, because I don’t want to break it even more. I also would like to restart mysql, but, again, I haven’t done it yet, because I would like to understand what exactly is going on first.

Should I uninstall/re-install Sage and choose not to overwrite the files?

I appreciate any feedback :slight_smile:

Thanks, @steve. I think the yarn warnings are a separate issue to the errors connecting to the database.

Running yarn will generate the yarn.lock file for you. You should see a line success Saved lockfile. after running yarn.

Feel free to ignore the yarn warning messages and follow the steps from the docs as you are already doing :smiley:

1 Like

Hi @silumesii,

Do you know why the yarn installation was killed (the last line in my quote in my original post)?

When I ran yarn, it said “info No lockfile found.” Do you happen to know at what point the yarn lock file is created and where it’s located?

Hi, @steve. I don’t know why the yarn installation died - resources, perhaps?

A fresh Sage install does not have a yarn.lock but it gets generated when you run yarn. It is located in the folder you run yarn from. In this case it is the root of your Sage theme.

Have you been able to get things to work?

1 Like

Thank you, @silumesii.

I got it working by increasing my server’s memory. Yarn created a lock file after installing all dependencies.

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.