How to validate a patch file for patch-package? - validation

I have a made a patch file for patch-package npm module: https://github.com/ds300/patch-package
Problem is, when I try to run the patch, it results in this error:
ERROR Failed to apply patch for package react-native
This happened because the patch file patches/react-native+0.59.10.patch could not be parsed.
How can I validate and locate the error where the patch file parsing went wrong?
Patch-package version: "patch-package": "^6.4.5",

Related

Build kustomize 3.2.0 on Windows

Can someone suggest how to install 3.2.0 version of kustomize on Windows, please?
I need specifically v3.2.0 on Windows. I am following this tutorial.
Source code: https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0
I downloaded the zip file and installed Go. However when I run go install . inside that kustomize folder i get: no Go files in path/kustomize/..
Also tried step by step aforementioned tutorial but same error..
EDIT: Trying to install via https://github.com/kubernetes-sigs/kustomize/blob/master/hack/install_kustomize.sh ./install_kustomize.sh 3.2.0 I get: Version v3.2.0 does not exist.
When I try ./install_kustomize.sh 3.2.1 I get:
tar (child): ./kustomize_v*_windows_amd64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Env: Windows 10, executing in GIT Bash
You'll need to run go install ./cmd/kustomize/.
That is where the main.go is you want built.
This will install the executable in your %GOBIN%.
You might want to use go build -o kustomize.exe ./cmd/kustomize/ instead to get the executable in your current working directory.

Not accessing the correct package

I have to use qdiscs in some part of my project. so i was using the below command and got this error. the problem is there is libnl3 package prersent but it is searhing for libnl version.
nl-qdisc-add --dev=veth-host --parent=root --update plug --buffer
Error: Unable to load module "/usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so": /usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so: cannot open shared object file: No such file or directory
So I tried this solution mentioned in comments, but its not working. cannot comment on this link due to reputation.
I changed the 4th step to ./configure --prefix=/usr/local --with-pkgconfigdir=/usr/local/lib because of some error it was giving.
It throws this error:
/usr/local/sbin/nl-qdisc-add --dev=veth-host --parent=root plug --limit=32768
/usr/local/sbin/nl-qdisc-add: /lib/x86_64-linux-gnu/libnl-3.so.200: no version information available (required by /usr/local/sbin/nl-qdisc-add)
/usr/local/sbin/nl-qdisc-add: /usr/lib/x86_64-linux-gnu/libnl-cli-3.so.200: no version information available (required by /usr/local/sbin/nl-qdisc-add)
/usr/local/sbin/nl-qdisc-add: /usr/lib/x86_64-linux-gnu/libnl-route-3.so.200: no version information available (required by /usr/local/sbin/nl-qdisc-add)
Error: Unable to load module "/usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so": /usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so: cannot open shared object file: No such file or directory
I'm using the system ubuntu 19.10

How to fix library dependence in a conan package

I am trying to install qt/5.14.2 with conan.
Using
qt/5.14.2#bincrafters/stable
I receive
ERROR: libpq/11.5: Error in package_info() method, line 211
self.cpp_info.components["pq"].requires.append("zlib::zlib")
AttributeError: 'Component' object has no attribute 'requires'
OK, there is a bug in libpq/11.5
I am trying to downgrade to
libpq/11.4#bincrafters/stable
ERROR: Conflict in qt/5.14.2#bincrafters/stable:
'qt/5.14.2#bincrafters/stable' requires 'zlib/1.2.11' while 'libpq/11.4#bincrafters/stable' requires 'zlib/1.2.11#conan/stable'.
To fix this conflict you need to override the package 'zlib' in your root package.
BTW:
Why is it not enough to require the correct version of the library, and requiring the same repository? (and require two different repositories in two different packages for the same dependence)
OK, I attempted
zlib/1.2.11#bincrafters/stable
WARN: libpq/11.4#bincrafters/stable: requirement zlib/1.2.11#conan/stable overridden by your conanfile to zlib/1.2.11#bincrafters/stable
zlib/1.2.11#bincrafters/stable: Not found in local cache, looking in remotes...
zlib/1.2.11#bincrafters/stable: Trying with 'conan-center'...
zlib/1.2.11#bincrafters/stable: Trying with 'minres'...
zlib/1.2.11#bincrafters/stable: Trying with 'bincrafters'...
ERROR: Failed requirement 'zlib/1.2.11#bincrafters/stable' from 'libpq/11.4#bincrafters/stable'
ERROR: Unable to find 'zlib/1.2.11#bincrafters/stable' in remotes
Finally, I arrived at
libpq/11.4#bincrafters/stable
zlib/1.2.11#conan/stable
qt/5.14.2#bincrafters/stable
After this, it looks like it was oK:
Installing (downloading, building) binaries...
qt/5.14.2#bincrafters/stable: Retrieving package 93c70de10405da9f2d5a1f42b8c299ca7af869d2 from remote 'bincrafters'
Downloading conanmanifest.txt
Downloading conaninfo.txt
Downloading conan_package.tgz
....qt/5.14.2#bincrafters/stable: Package installed 93c70de10405da9f2d5a1f42b8c299ca7af869d2
qt/5.14.2#bincrafters/stable: Downloaded package revision 0
However, the install fails with
CMake was unable to find Qt5, put qmake in your path or set
QTDIR/QT_QMAKE_EXECUTABLE.
The package is downloaded, I see all components in the corresponding subdirectory in my home directory. However, unlike the other components, it is not installed, before CMake attempts to find it.
What do I wrong?
In case of any strange behavior of conan, upgrade! For me, switch 1.24.0 -> 1.28.1 with configs clean up fixed the same problem with libpq/11.5

read-the-docs: ImportError despite dependency being set in setup.py

Consider this build error:
I see lines like: ImportError: No module named swisseph and invalid signature for automodule (u'jyotisha\n :members:'). My setup.py does include pyswisseph as a dependency already.. What's a good fix?
PS: My local sphinx build seems fine.
Following #steve-piercy's tip and the FAQ, I was able to get past this error - I just needed to to enable the virtualenv feature in the Admin page of my project.
The install then fails for another (as yet undebugged reason) - but that's separate.

Swagger-editor running locally shows empty page

I am new to swagger.
I have created APIs in django-rest-framework. I want to document them. Hence reading about swagger.
I tried django-rest-swagger but because of lack of documentation I could not make my code suitable for documentation.
Hence I am trying swagger editor which will allow me to design API structure from scratch. I have installed it locally but it is showing me empty page at "127.0.0.1:9000". what should I do now ?
I want to write YAML or JSON file that will be consumed by swagger-editor installed locally. How can I achieve this ?
This is the error on console when I load 127.0.0.1:9000
Warn: could not find module util
http://127.0.0.1:9000/bower_components/angular-schema-form/dist/schema-form.js Failed to load resource: the server responded with a status of 404 (Not Found)
angular.js:80 Uncaught Error: [$injector:nomod] Module 'schemaForm' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.3.2/$injector/nomod?p0=schemaForm
angular.js:80 Uncaught Error: [$injector:modulerr] Failed to instantiate module PhonicsApp due to:
Error: [$injector:modulerr] Failed to instantiate module schemaForm due to:
Error: [$injector:nomod] Module 'schemaForm' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
I'm not exactly sure what is the problem here. As a general note, you can always clean up npm and Bower modules and start from clean state again.
npm cache clean
rm -rf node_modules
npm install
bower cache clean
rm -rf app/bower_components
bower install
npm start
I was having the same problem.
Previously my node version was the latest v6
I reinstalled everything and then install v4.4.4
node --v
make sure it's v4.4.4
npm install -g http-server
wget https://github.com/swagger-api/swagger-editor/releases/download/v2.10.1/swagger-editor.zip
unzip swagger-editor.zip
http-server
don't use http-server swagger-editor

Resources