Prettier 'Ignored unknown option" - prettier

I'm getting this warning for multiple prettier options, even though I'm calling via npx (ie: latest version of prettier) and the options are in the documentation. Why?
npx prettier "**/*" --write --ignore-unknown --no-error-on-unmatched-pattern
...
[warn] Ignored unknown option --ignore-unknown.
[warn] Ignored unknown option --no-error-on-unmatched-pattern.

This turned out to be some version weirdness caused by a prettier plugin in a yarn workspace package (when I did npx prettier -v I got a really old version).
I ended up putting prettier in nohoist, which did the trick.

Related

Failure to "opam init", how to manually specify index.tar.gz?

I cannot opam init:
$ opam init --verbose
[NOTE] Will configure from built-in defaults.
Checking for available remotes: rsync and local, git, mercurial.
- you won't be able to use darcs repositories unless you install the darcs command on your system.
<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
[ERROR] Could not update repository "default": OpamDownload.Download_fail(_, "Curl failed: \"/usr/bin/curl --write-out %{http_code}\\\\n --retry 3 --retry-delay 2
--user-agent opam/2.0.7 -L -o /tmp/opam-1697-6d07ae/index.tar.gz.part https://opam.ocaml.org/index.tar.gz\" exited with code 28")
[ERROR] Initial download of repository failed
However, I've manually downloaded index.tar.gz. How to manually specify index.tar.gz to opam init?
System info:
$ uname -a
CYGWIN_NT-10.0-19043 xxx 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin
P.S. I'm trying to build one project using OCaml, but it turned out that it is very tricky: either OCaml complains about compatibility (is not a compiled interface for this version of OCaml followed by It seems to be for an older version of OCaml; does it mean that OCaml is not backward compatible?), either opam init fails, either <whatever>.
Your error message indicates that you either have network problems or very poor connection. Also, you opam version is very old, so it might not handle bad networks very well, I would suggest your installing a newer version of opam (at least 2.1.x), or, if it is possible, switching to docker or a virtual machine.
Answering your original question: I don't think there is a way (at least officially supported to specify your own downloaded index). Also, if you have trouble with downloading the index it most likely means that you will have more trouble in the future with your network when opam will start downloading actual packages.

How to add trix.css when it is removed after pruning?

After pruning with the command "docker system prune -a" nodejs wont build anymore beacuse trix.css is missing. I am assuming this was probably deleted while pruning. How can I resolve this error (see the error below)? Why is it not created again while building the container again since the file is in the docker file.
Required path doesn't exist: /code/bower_components/trix/dist/trix.css trix
[13:57:39] 'vendorcss' errored after 1.63 ms
[13:57:39] Error: Promise rejected without Error
at Domain.onError (/usr/local/lib/node_modules/gulp/node_modules/async-done/index.js:49:15)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Domain.emit (events.js:211:7)
at Domain._errorHandler (domain.js:134:21)
at process._fatalException (bootstrap_node.js:375:33)
[13:57:39] 'staging' errored after 41 ms
ERROR: Service 'nodejs' failed to build: The command '/bin/sh -c gulp staging' returned a non-
zero code: 1
Usually I use this command : "sudo docker-compose -f docker-compose-staging.yml build nodejs" when I want to build the container again. I am very new to this and would be greatfull for some help.
For me, this was the case:
The issue exists because trix.css was removed in the latest version. It has nothing to do with docker system prune as far as I understand.
You can compare the two versions here: https://github.com/basecamp/trix/compare/1.3.1...v2.0.0
Basically, in order to fix this issue, you need to do
yarn install
yarn build
inside bower_components. This is suggested in the official updated README of the trix repository: https://github.com/basecamp/trix.
Once done with that, you will have trix.css and trix.umd.min.js files for your perusal.

GoogleCloudPlatform Buildpacks failed to build

I haven't changed anything recently in my project, but when I tried to deploy it last, I received this error in the logs: ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
See the full log here: log-d20114fe-3eeb-4a8d-8926-3a971882894c.txt
This is my requirements.txt:
requirements.txt
It seems like it is an issue with the dependencies for the snowflake-connector-python package, but I am not really sure what would have caused this. I see in the logs:
-- Running cmake for pyarrow
Step #0 - "Buildpack": cmake -DPYTHON_EXECUTABLE=/layers/google.python.runtime/python/bin/python3 -DPython3_EXECUTABLE=/layers/google.python.runtime/python/bin/python3 "" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_PLASMA=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HDFS=off -DPYARROW_USE_TENSORFLOW=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_BOOST=off -DPYARROW_GENERATE_COVERAGE=off -DPYARROW_BOOST_USE_SHARED=on -DPYARROW_PARQUET_USE_SHARED=on -DCMAKE_BUILD_TYPE=release /tmp/pip-install-w1g_50oc/pyarrow_4a54282bee5f4c3c8399d3428e4134e6
Step #0 - "Buildpack": error: command 'cmake' failed: No such file or directory
This makes me think CMake is the problem, but I tried explicitly adding CMake to my requirements file and had the same result.
I also looked at the last successful build, and it looks like I was running python version 3.10.8, and the one that failed first was running 3.11. How can I change what python version cloud build uses? I am using the cloudbuild.yaml file instead of docker.
Figured it out! The issue was with not specifying a version in Cloud Build for Python, so it was defaulting to 3.11, which does not yet have support for pyarrow. I ended up setting the version in the cloud build yaml file to 3.10.8 like so:
steps:
- name: gcr.io/k8s-skaffold/pack
env:
- GOOGLE_ENTRYPOINT=$_ENTRYPOINT
- GOOGLE_RUNTIME_VERSION=$_RUNTIME_VERSION
args:
- build
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
- '--builder=gcr.io/buildpacks/builder:v1'
- '--network=cloudbuild'
- '--path=.'
- '--env=GOOGLE_ENTRYPOINT'
- '--env=GOOGLE_RUNTIME_VERSION'
For those of you who are using a Procfile
I was able to fix by creating a .python-version file that contains just the version number needed,
i.e. 3.10.4

WebStorm and ESLint (cannot find module 'usr/lib/node_modules/semistandard/lib/cli,js')

I just installed StandardJS and realised I want semicolons. I stumbled upon Semistandard (which is "all the goodness of standard + semicolons"), however I'm having difficulty adding it as my code style to my IDE (RubyMine).
I installed semistandard globally using npm install semistandard -g and selected it as my ESLint package, the same way I did with standard, however when I press apply, the IDE complains with the error message:
"ESLint: Initialization error (ESLint). Cannot find module '/usr/lib/node_modules/semistandard/lib/cli.js".
Has anyone encountered this error message or know how to fix it?
Semistandard is not supported, please vote for WEB-29114

ERROR: Failed to build PhantomJS! Building Qt Base failed

I have Debian Linux(64-bit) in VirtualBox.
Ram: 8Gb (for Debian 4Gb)
CPU: i5-3470
If any other details are needed please tell me.
I have followed instructions written here, and here you can see the console log.
For some reason I am unable to to build phantomjs and I can't understand why its not working... Have searched a lot, but couldn't find any thread which would be about this error.
--- EDIT ---
When I executed this command:
./configure --with-openssl-includes=/usr/include/openssl-1.0/ --with-openssl-libraries=/usr/lib/openssl-1.0/
Output was this:
--with-openssl-includes=/usr/include/openssl-1.0/: invalid command-line switch
--with-openssl-libraries=/usr/lib/openssl-1.0/: invalid command-line switch
The output of the console has changed but I still get errors: https://pastebin.com/wbgi8syg
Looks like you are on stretch (or later) and that you are already aware of the libssl vs libssl1.0 case.
Therefore, if you don't have libssl-dev installed, this line will get you further:
python build.py --qt-config "-I /usr/include/openssl-1.0/ -L /usr/lib/openssl-1.0/"
If you already have it installed and my suggestion doesn't work, you can uninstall libssl-dev for the time to build phantomjs which will likely avoid having to play further with configuration related variables.