dj-stripe referencing a non-existent migration - django-migrations

I have a django model where I have a OneToOneField to djstripe's Customer. When I run makemigrations a migration is created with the following dependency:
dependencies = [ ('djstripe', '0011_alter_invoice_charge_alter_invoice_customer_and_more'), ('users', '0007_rename_username), ]
Everything seems to be okay locally, but then when I deploy my code it fails with the following error:
django.db.migrations.exceptions.NodeNotFoundError: Migration users.0008_stripecustomer dependencies reference nonexistent parent node ('djstripe', '0011_alter_invoice_charge_alter_invoice_customer_and_more')
Our pipeline does not run makemigrations, only migrate, so this seems a little weird that a djstripe migration is created when I run makemigrations locally but then I cannot use it in deployment. Plus, such migration does not exist in djstripe GitHub repository.
dj-stripe version: 2.6.1
Python version: 3.9
Django version: 4.0.1
Stripe API version: 2.68.0
Database type and version: postgres 12.9

It's an known bug in v. 4 - https://github.com/dj-stripe/dj-stripe/issues/1649#issuecomment-1117774629
To solve it you'd have to downgrade django to 3.x.x. They should fix it in the next update as well.

Related

Cannot import jdl file using jhipster

I'm new to jhipster. I am on jhipster v7.8.1, i can generate an app using the cli questions but when i try importing a jdl file i got the following error:
**ERROR! Class constructor GAstVisitor cannot be invoked without 'new'
TypeError: Class constructor GAstVisitor cannot be invoked without 'new'
at new DslMethodsCollectorVisitor
This occurs due to a recent bug in the one of JHipster libraries. As a temporary solution you can go to the JHipster installed location and find it's package.json file and override the package causing this error as follows. Then run npm install again.
"overrides":{
"chevrotain#10.1.2": {
"#chevrotain/gast": "10.1.2"
}
}
This will prevent the JHipster using latest package of that.
I experienced the same error and managed to get the JDL file to run by using version 7.8.1
I followed the following steps to get this done;
uninstall the current version of jhipster that is causing issues for
my case this was 7.9.2 . use this command npm uninstall -g
generator-jhipster
Install version 7.8.1 using this command npm
install -g generator-jhipster#7.8.1
Attempt to run your JDL using
this command jhipster jdl jhipster-jdl.jdl
At this stage, your JDL
will be able to run

Error: Get config: Unable to establish a connection to query-engine-node-api library in Prisma and nextjs

I use nextjs fresh project with Prisma and supabase database. I'm using ubuntu.
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
when I run Prisma push and generate command in my project. I face the same error with npm and yarn.
I run all Prisma command. I start with a fresh supabase database.
prisma migrate dev
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Get config: Unable to establish a connection to query-engine-node-api library
Prisma CLI Version : 3.15.2
npx prisma db push
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Get config: Unable to establish a connection to query-engine-node-api library
Prisma CLI Version : 3.15.2
prisma/schema.prisma file
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int #id #default(autoincrement())
email String #unique
name String?
}
After I added the environment variable.
DATABASE_URL="postgresql://postgres:EeVVG-password-wDiII#db.qpzh-url-opda.supabase.co:5432/postgres"
I do not find why I'm facing errors with Prisma and supabase. I'm deleting the `node_modules` folder and creating one more project. but the problem is not solved.
I had the same issue. Check if you're in a sandbox terminal. In my case, my anaconda environment was on and so, I couldn't initiate the migration. Open a fresh terminal without any environments or sandboxes. Also, Looking into other solutions, I found out that if your nodejs installation is done using snap, then also this error occurs. Try reinstalling nodejs using apt.
I have faced the same error.
Downgrading node from 18 to 16 solves this problem for me. I did't find better solution for this problem. Reference: prisma github comment. I don't recommend to downgrade though.
But prisma works normally on node 16 lts.

Terraform Incompatible API version with plugin. Plugin version: 5, Core version: 4

Running into this module error no one on my team, which is all new, does not know. Below is my terraform version. And yes, I know terraform 0.11 is old as hell but I was just hired and have to fix this.
$ terraform --version
Terraform v0.11.14
provider.aws v2.70.0
provider.grafana v1.10.0
provider.kubernetes v1.8.0
provider.null v2.1.2
provider.postgresql v1.7.2
provider.random v2.3.1
Error:
Error: Error asking for user input: 1 error occurred:
* module.editedout-dev-keycloak.provider.grafana: Incompatible API version with plugin. Plugin version: 5, Core version: 4
As described in the documented requirements for the Grafana provider version 1.10, the minimum core version of Terraform for that version of the provider is 0.12. The reason for this can be seen referenced in the CHANGELOG with issue 159. The provider upgraded to version 2 of the provider SDK, which enforces core Terraform at minimum version 0.12. More details around that minimum version bump can be read in that issue description.
If you want to move forward, then you would need to lock in the Grafana provider to version 1.9.0. In Terraform version 0.11, you would achieve that with the following declarative syntax in a config file for the root module config, or preferably in the module declared as editedout-dev-keycloak in the error message you displayed:
provider "grafana" {
version = "1.9.0"
}

I am trying to install Vapor on my raspberrypi but getting strange errors

I am running Raspbian and have so far installed Swift 5.1.5 and cloned Vapor Branch 18.0.0 beta 27. I can't seem to get version 5.2 of Swift installed on my system somehow.
Nonetheless, the next step is to build Vapor, but it gives me the following error:
sudo swift build -c release
Updating https://github.com/jpsim/Yams.git
Updating https://github.com/apple/swift-nio.git
Updating https://github.com/vapor/console-kit.git
Updating https://github.com/apple/swift-log.git
Updating https://github.com/tanner0101/mustache.git
https://github.com/apple/swift-nio.git # master: error: terminated(128): git -C /home/pi/Downloads/toolbox/.build/repositories/swift-nio-b68c973e rev-parse --verify 'master^{commit}' output:
fatal: Needed a single revision
Not sure where to go from there, can't find any relevant info online.
Vapor 4 and the new toolbox all require Swift 5.2 - you'll need to get the installed before anything else.
Next that's an old version of the toolbox, you can find the latest release at https://github.com/vapor/toolbox/releases
Finally, the chances are you don't need the toolbox. It's used for creating new projects. If you just want to build or run existing ones, just use the swift commands

Dotnet restore not working

dotnet Version: 1.1.0 (global.json)
NuGet Version : 4.4.1.4656
VS2017 v15.5.2 (as Administrator)
.NET Core 1.1
The solution I am trying to build
Update I:
I just changed the project to run under target framework .NET Core v2.0 & sdk version 2.1.3 and I only get these kind of errors:
Severity Code Description Project File Line Suppression State
Error NU1202 Package Microsoft.Extensions.FileProviders.Physical 1.1.0
is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0).
Package Microsoft.Extensions.FileProviders.Physical 1.1.0 does not
support any target
frameworks. AspNetCoreExample C:\Users\Admin\Source\Repos\Examples\src\AspNetCoreExample\AspNetCoreExample.csproj 1
Update II:
While the following solves the current issue, i am not sure if it solves the root cause for this issue.
Delete the global nuget.config file %AppData%/Nuget/Nuget.config.
I fixed this issue by doing the following:
I migrated the project to .net core 2.0 and changed the global.json to point to sdk 2.1.3.
Removed all references in AspNetCoreExample manually and added the latest version for all of them.
Issues with target framework 1.1
When doing a restore from the solution in VS 2017:
When doing the restore from cmd (dotnet restore)
Running dotnet restore in Package Manager Console
NuGet.targets(103,5): error : Access to the path 'System.Runtime.dll'
is denied
.NET Core SDKs installed:
.NET Host
Now when opening the solution I get:
Comparing the log entries you pasted to their AppVeyor build,
https://ci.appveyor.com/project/Autofac/examples
Your machine's NuGet configuration seems to be broken. Analyze that and fix the issues.
You should add this code to your .csproj file
<RuntimeFramework>2.0.3</RuntimeFramework>
This worked for me.