Hugo Error - Current theme does not support current version - linux

I'm attempting to build my hugo site but when I run hugo check I see the following error log:
ERROR: 2017/09/10 Current theme does not support Hugo version 0.14. Minimum version required is 0.18
ERROR: 2017/09/10 template: theme/_default/baseof.html:2: function "default" not defined
ERROR: 2017/09/10 template: redefinition of template "main"
ERROR: 2017/09/10 template: theme/_default/single.html:7: function "humanize" not defined
ERROR: 2017/09/10 template: redefinition of template "main"
ERROR: 2017/09/10 template: theme/_default/terms.html:12: function "relLangURL" not defined
ERROR: 2017/09/10 template: theme/index.html:6: function "default" not defined
ERROR: 2017/09/10 template: theme/partials/menu-contextual.html:12: function "humanize" not defined
ERROR: 2017/09/10 template: theme/partials/page-header.html:9: function "default" not defined
ERROR: 2017/09/10 template: theme/partials/site-footer.html:4: function "now" not defined
ERROR: 2017/09/10 template: theme/partials/site-header.html:1: function "default" not defined
ERROR: 2017/09/10 template: theme/partials/social-follow.html:5: function "dict" not defined
ERROR: 2017/09/10 template: theme/partials/summary.html:3: function "humanize" not defined
ERROR: 2017/09/10 template: theme/post/single.html:11: function "humanize" not defined
ERROR: 2017/09/10 template: redefinition of template "main"
It says that I need Hugo version 0.18 but when I run sudo apt-get install hugo it tells me:
hugo is already the newest version
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
So I'm confused as to why I'm getting the error. Has anyone run into this error? Know how I can fix it?

Ubuntu's main download repos are maintained by Canonical, and they are outdated for GoHugo latest releases. Hence, sudo apt upgrade hugo will not be much of help. Even now, hugo latest release is 0.48 dated August but the apt gives me only upto 0.40 outdated as of April.
Always try to use sudo snap install hugo in Ubuntu for up-to-date experience with Go Hugo. Snaps are maintained and updated very well. So even if you miss manually to update your packages, it seamlessly updates in background within 12 hours of releases after arriving at Snap Stores.
Uninstall all the instances of Hugo and try fresh installation with snaps if possible because new versions always tend to leave support for some old configs. You can try verifying your needed hugo version using sudo snap search hugo which gives details of which latest version is available in snap store currently.
Or manually you could download the latest release link and update your version and finally check with sudo hugo version. You can also confirm its primary location in system by whereis hugo and replacing it with newer versions.

If you're not getting the latest version of Hugo using apt then you should attempt to download it directly from the Github repository. Click on the latest release (or whichever version you need). Once you're on the release page, scroll down to the Downloads section and then download the file by clicking on it or by using wget download the compressed file. Then extract the file and run ./hugo version to confirm the version.

Related

failed to compile testmain package - compile, no such file

I'm new to Go programming and trying to set up the BDD framework Godog. I have extracted the Linux binary from the Github releases page and placed it on my $PATH. When I run it, I get the following error:
Error: failed to compile testmain package: fork/exec /opt/hostedtoolcache/go/1.17.7/x64/pkg/tool/linux_amd64/compile: no such file or directory - output:
For some reason godog version does not show an actual version, which leads me to believe it's not installed correctly.
❯ godog version
Show current version
Additional system information:
❯ go version
go version go1.18.3 linux/amd64
I don't know if this is relevant, but I'm using asdf to manage my local go installation.

Issue with node while building svelte application in cloudflare pages

When I try and deploy my svelte project in Cloudflare pages I get this error
22:58:31.466 Cloning repository...
22:58:32.245 From https://github.com/ehubbartt/ethanhub
22:58:32.245 * branch 7807b7d14bc466249b9955d9ef06431003cd53ac -> FETCH_HEAD
22:58:32.246
22:58:32.295 HEAD is now at 7807b7d sdfs
22:58:32.295
22:58:32.438
22:58:32.464 Success: Finished cloning repository files
22:58:33.142 Installing dependencies
22:58:33.155 Python version set to 2.7
22:58:35.570 Attempting node version 'NODE_VERSION=12.18.0' from .nvmrc
22:58:37.196 Version 'NODE_VERSION=12.18.0' not found - try nvm ls-remote to browse available versions.
22:58:37.199 Failed to install node version 'NODE_VERSION=12.18.0'
22:58:37.204 Failed: build command exited with code: 1
22:58:38.110 Failed: an internal error occurred
Here is whay my .nvmrc file contains
NODE_VERSION=12.18.0
And I also have the environment variable set for the page.
NODE_VERSION=12.18.0
I have tried setting the version to many different things but can't quite get it to work and build

Seeing "The filename or extension is too long" when "terragrunt plan" is executed in Windows

Executing "terragrunt plan" from Visual Studio code gives the below error in Windows 10:
Running command: terraform init -backend-config=region=eu-west-2 -backend-config=bucket=bucket-name" -backend-config=dynamodb_table=lock-table -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate
Initializing the backend...
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
Finding hashicorp/aws versions matching "~> 3.36.0"...
Installing hashicorp/aws v3.36.0...
Error: Failed to install provider
Error while installing hashicorp/aws v3.36.0: mkdir
.terraform/plugins/registry.terraform.io/hashicorp/aws/3.36.0/windows_amd64:
The filename or extension is too long.
[terragrunt] 2021/05/19 15:39:20 Hit multiple errors:
exit status 1
Thanks Rubens for suggesting using TERRAGRUNT_DOWNLOAD environment variable. I'm able to work around this problem.
Here are the complete steps in terragrunt:
from cmd, set TERRAGRUNT_DOWNLOAD and call init:
set TERRAGRUNT_DOWNLOAD=C:\\.terragrunt-cache
terragrunt init
Then copy or move C:\\.terragrunt-cache content to the .terragrunt-cache in my project (better clean up the folder first)
from cmd, unset TERRAGRUNT_DOWNLOAD and call apply
set TERRAGRUNT_DOWNLOAD=
terragrunt apply
Had this problem today and I solved by creating a TERRAGRUNT_DOWNLOAD environment variable.
I set the value to TERRAGRUNT_DOWNLOAD=C:\.terragrunt-cache.
Got this solution from this issue
https://github.com/gruntwork-io/terragrunt/issues/581#issuecomment-460051767
The proper fix is here:
Start Git Bash as Administrator
Run command git config --system core.longpaths true
How to fix "Filename too long error" during git clone
I had faced similar issue on terraform init. I installed latest version of terraform and it got resolved.

Getting error when deploying a Google Cloud Function after Node upgrade

I updated Brew then updated Node from 10.12.0 -> 13.8.0
Now, I get the following error when trying to deploy a Google Cloud Function
firebase deploy --only functions:createJWT
i functions: preparing functions directory for
uploading...
Error: Error parsing triggers: Failed to load gRPC binary module
because it was not installed for the current system Expected
directory: node-v79-darwin-x64-unknown Found:
[node-v64-darwin-x64-unknown] This problem can often be fixed by
running "npm rebuild" on the current system Original error: Cannot
find module
'/Users/.../cloud-functions/functions/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node'
Require stack:
- /Users/.../cloud-functions/functions/node_modules/grpc/src/grpc_extension.js
- /Users/.../cloud-functions/functions/node_modules/grpc/src/client_interceptors.js
- /Users/.../cloud-functions/functions/node_modules/grpc/src/client.js
- /Users/.../cloud-functions/functions/node_modules/grpc/index.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/service.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/operation.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/index.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/logging/src/index.js
- /Users/.../cloud-functions/functions/index.js
- /usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js
Try running "npm install" in your functions directory before
deploying.
Tried npm rebuild and npm install in my functions directory and nothing works
Furthermore...could this issue be due to the fact that GCF Node runtime enviroment is Node10 and I have installed Node13 on my machine? - according to these docs:
https://cloud.google.com/functions/docs/concepts/nodejs-10-runtime
I am struggling to revert back to Node10, have tried by running brew install node#10 and get this:
Then tried running the following command as per output above to symlink it to /usr/local but still no luck
echo 'export PATH="/usr/local/opt/node#10/bin:$PATH"' >> ~/.bash_profile
Searching around about this error, indeed, this seems that the problem is related to your system waiting for a version and founding another one - as per this part of the error.
Error: Error parsing triggers: Failed to load gRPC binary module because it was not installed for the current system Expected directory: node-v79-darwin-x64-unknown Found: [node-v64-darwin-x64-unknown]
There are some options that you can give it a try, besides trying the npm rebuild. Another option might be updating the package.json - as per this case solved here - that would return your npm version to an old one.
Besides that, on this question in the Community, there are a few solutions that helped other users, that I would recommend you to take a look at it: NodeJs Error - Failed to load gRPC binary module because it was not installed for the current system Expected directory?
Let me know if the information helped you!
Trying to deploy to an unsupported Google Function execution environment won't work. According to the google docs the current supported environments are Node8 and Node10(beta), re-installing Node10 worked for me.

Node Sass error in Angular: Mixins may not be defined within control directives or other mixins

I have a project written in Angular 4 and I am trying to build it, but I keep getting this error: Mixins may not be defined within control directives or other mixins.
I've looked around on the internet and I saw some recommendations to downgrade node-sass to the version 4.8.1, but when I tried to do this, I got a 404 erro from Github:
> node-sass#4.8.1 install c:\my-project\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node":
HTTP error 404 Not Found
And sure enough, this address: https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node doesn't exists. My guess is because there are new versions of node-sass available and the 4.8.1 was pushed back to the second page: https://github.com/sass/node-sass/releases?after=3.5.3.
I know that I am using a very old version of Angular and I have plans to upgrade it, but I don't have the time to do this now, has someone managed to solve this?
Download win32-x64-64_binding.node, put in the local:
C:\Users\{username}\AppData\Roaming\npm-cache\node-sass\4.8.1\
Then install again.

Resources