About not being able to do pub install in Dart - dart-pub

https://github.com/eee-c/dart-comics
I installed the Dart SDK to run the above web app. The environment is Debian. Then I migrated to the folder /dart-comics-your_first_dart_app and did a "pub install" and got the following output.
pub install
pubspec.yaml has no lower-bound SDK constraint.
You should edit pubspec.yaml to contain an SDK constraint:
environment:
sdk: '>=2.10.0 <3.0.0'
See https://dart.dev/go/sdk-constraint
And after that, I changed the contents of pubspec.yaml as follows, and got the following error. How can I run it?
name: Dart Comics
dependencies:
dirty: any
uuid: any
json: any
environment:
sdk: '>=2.10.0 <3.0.0'
pub install
Error on line 1, column 7 of pubspec.yaml: "name" field must be a valid Dart identifier.
╷
1 │ name: Dart Comics
│ ^^^^^^^^^^^
╵

Use like this :
"name: Dart_Comics"
Just using _ will solve this issue.

Related

Could not locate update bundle - Electron

Electron-Builder Version: 22.14.2
Node Version: 16.14.2
Electron Version: 13.1.9
Electron Type (current, beta, nightly): current
Target: MacOS, but i need WML
[Error: Could not locate update bundle for com.github.Electron within
file:///Users/lucas/Library/Caches/com.github.Electron.ShipIt/update.erv01nk/]
{ code: 2, domain: 'SQRLUpdaterErrorDomain' } Error: Error: Could not
locate update bundle for com.github.Electron within
file:///Users/lucas/Library/Caches/com.github.Electron.ShipIt/update.erv01nk/
When I try to do the update, it throws this error right after finishing the download and calling autoUpdater.quitAndInstall()

Terraform plan leads to: '"archive": openpgp: signature made by unknown entity' error

It was working before, but today I have:
Error installing provider "archive": openpgp: signature made by unknown entity.
I tried to install this plugin plugin manually, but having the same problem
This can happen on Terraform v0.11. To fix, specify a version:
provider "archive" {
version = "1.0.0"
}
We had this issue on Terraform version 0.11.4.
Bumping to 0.11.5 and specifying archive provider version 1.3.0 fixed the issue.
Version 11.4 specifies the following was added, which might have fixed the issue:
cli: Update the HashiCorp Public Key (#28498)
https://github.com/hashicorp/terraform/releases/tag/v0.11.15

Syntax Error: Unexpected Name "implements"

After downloading the contentful plugin and setting it up for my gatsby site, I try running "npm run develop" but when I run it the following error appears:
Encountered an error parsing the provided GraphQL type definitions:
Syntax Error: Unexpected Name "implements"
They show that the error is in this code:
interface ContentfulEntry implements Node {
contentful_id: String!
id: ID!
node_locale: String!
}
However, I can't find the file which has this code nor have I written it.
I just had the same issue. I've changed "gatsby-source-contentful" version from 5.1.1 to 4.6.3 and it worked...
Which version of Gatsby you are using? Gatsby-source-contentful 5 seems to require Gatsby 3. I got a warning in that regard before the error.
I guess this has to do with Graphql version differences. See this: https://www.gatsbyjs.com/docs/reference/release-notes/v3.0/#graphql-15

i can't install package cached network image

I am trying to create a new application with flutter, and i want to use package cached network image, but the package don't want to install in my pubspec.yaml
I tried flutter upgrade, and flutter doctor show no error
dependencies:
flutter:
sdk: flutter
firebase_auth: ^0.14.0+2
firebase_core: ^0.4.0+8
cloud_firestore: ^0.12.9
firebase_storage: ^3.0.5
font_awesome_flutter: ^8.5.0
fluttertoast: ^3.1.0
image_picker: ^0.6.1+3
cached_network_image: ^1.1.1
C:\fltr\flutter\bin\flutter.bat --no-color packages get
Running "flutter pub get" in socialflutter_app...
Error on line 1, column 1 of ..\..\..\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cached_network_image-1.1.1\pubspec.yaml: Unexpected character.
╷
1 │
│ ^
╵
pub get failed (65)
Process finished with exit code 65
Try navigating to your Flutter folder, then to pub-cache\hosted\pub.dartlang.org\ and remove all cached_network_image folders.
then run flutter packages get again in your project.

Hugo Error - Current theme does not support current version

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.

Resources