Hi, I am trying to get Bedrock and Sage working fault-free on my local development environment. I’m on a Mac. I do get it to work but I get errors and I would really appreciate some help by the community!
So I have been following the guide on this Repo:
The sequence I use is:
docker-compose run composer create-project
docker-compose up -d
docker-compose run composer create-project roots/sage web/app/themes/themename
When asked for " Path to theme directory" → /app/themes/themename
I can access the theme from the WP back end and activate it. It is “working” But with all the errors. Before I get into development I would like to ask what I am doing wrong and how I can eliminate these errors.
The error is telling you why you’re getting it: Node Sass doesn’t support your environment. It also tells you where to go to see supported environments, which is here: https://github.com/sass/node-sass/releases/tag/v4.9.4 That list stops at Node 10, so my first guess is that you have a too recent version of Node.
Although you changed the version for node-sass in your package.json you didn’t actually install the newer version because you left your yarn.lock file in place (see documentation for yarn install). You need to either
Delete your yarn.lock and re-run yarn
or
Run yarn add node-sass@4.14.1
in order to upgrade your version of node-sass. In general you should install new packages using yarn add because that will automatically update your package.jsonandyarn.lock files.
You would go through your entire dependency chain and update every dependency, resolving issues as you do so. I deal with them by ignoring them; most of them are a result of old upstream dependencies which I can do little or nothing about.
Right, and the dependency-chain, would that be located in the package.json file?
What other files would I need to go through?
And to update a dependency, for example “browser-sync > cokidar > Upgrade to fsevents” just as an example, would I do npm install fsevents? I guess I would need to do something in some files as well?
How to handle updating npm dependencies is beyond the scope of this forum. We try to keep this focused on the Roots stack, and while we use npm packages, in-depth support for dependency management is going to be better found elsewhere. I would recommend doing your own research on the subject: https://www.google.com/search?q=updating+npm+dependencies