updated flow-bin with yarn global add flow-bin#latest. yarn global ls shows "flow-bin#0.38.0". flow version shows Flow, a static type checker for JavaScript, version 0.37.4. How update flow to latest version?
OS: Linux Ubuntu 16.04
Yarn: latest
P.S. I also did reboot several times...
Thanks for any help!
Fixed.
Check where is flow - whereis flow
Remove it - sudo rm -rf /usr/bin/flow
Add Flow - yarn global add flow-bin#latest
I don't remember if I installed Flow with NPM or no, even after deleting whole Node.js and NPM and reinstalling, it was always 0.37.4 version, but after that fix everything seems fine.
Same for Mac OS (Catalina)
Check where is flow - which flow
Remove it - sudo rm -rf /usr/local/bin/flow
Add Flow - yarn global add flow-bin#latest
Within my project (react-native) I had to match the target version of the .flowconfig-file to the corresponding version I get from flow version in Terminal.
Related
Turbo crashes when using any command (e.g. turbo build), even when a valid project and turbo.json exists. This doesn't seem to be a problem on Ubuntu, but only on Alpine (arm64).
I've tried all of the new versions but they have the same issue.
npm install --global turbo
npm install --global turbo#latest
npm install --global turbo#canary
error:
thread 'main' panicked at 'Failed to execute turbo.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', crates/turborepo/src/main.rs:23:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Because I was stuck on this for a few hours, I'll share solution here (which I also shared on Github):
If using a Dockerfile: add RUN apk add --no-cache libc6-compat to it
If using it on an Alpine machine, run apk add --no-cache libc6-compat
More explanation in:
Docker Node image docs
Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.
The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements.
One common issue that may arise is a missing shared library ... . To add the missing shared libraries to your image, adding the libc6-compat package in your Dockerfile is recommended: apk add --no-cache libc6-compat
https://github.com/vercel/turbo/issues/3373#issuecomment-1397080265
I am trying to create a custom gutenberg block to use in the wordpress gutenberg editor but when trying the command: npx #wordpress/create-block test-block it starts with installing a few things but all of a sudden I get:
npx: installed 126 in 13.341s
Unexpected token .
What is causing this?
I am following this tutorial: https://kinsta.com/blog/gutenberg-blocks/ except I am not using any of the hosting options from the tutorial since I have my own wordpress installation already running (locally).
Check your node version, I got the same error using node.js version 12, then I changed it to versi
For folks on Ubuntu: I ran into the same issue and found that the nodejs installable via apt is out of date. I had to download the tarfile from nodejs.org and install it with the help of How to install node.tar.xz file in linux. After that it ran as I expected.
(I tried the LTS version. node --version returns v18.12.0)
I also had this problem. All I needed to do was to update my Node version.
I followed these steps (run in Mac Terminal):
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Hope this helps.
I am trying to run the following command but I am getting the error like
pa11y http://example.com/ # Trying to run this on my terminal
Welcome to Pa11y
------------------------
Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
at Launcher.launch (/usr/lib/node_modules/pa11y/node_modules/puppeteer/lib/Launcher.js:119:15)
at async runPa11yTest (/usr/lib/node_modules/pa11y/lib/pa11y.js:106:29)
at async pa11y (/usr/lib/node_modules/pa11y/lib/pa11y.js:55:19)
at async runProgram (/usr/lib/node_modules/pa11y/bin/pa11y.js:122:19)
I spent around 3-4 hours to fix this but no luck. I have tried every possible solution on the internet which is posted by others who had faced similar errors.
Any help in this regard is helpful
Two questions:
Do you have Chromium installed? pa11y doesn't think so! It could be a wrong version installed if so, or installed in a way that pa11y can't find.
What OS are you running?
The answer to your question depends on your Operating System, because the version of Chromium you need is specific to your OS! If you're running Linux Alpine,
the command would be something like this:
apk add -U --no-cache --allow-untrusted udev ttf-freefont chromium git
I had this problem when trying to run the Node package puppeteer (which uses Chromium) in a Docker container running node 12 alpine. I spent all weekend (yes...) to come to the 1 line (yes...) I needed. It turned out I needed to add the above line to my Dockerfile, which installs the necessary fonts and libraries and installs Chromium.
I also had to tell Puppeteer to skip installing Chromium, but I don't think that's applicable to your situation.
If you're running something other than Linux, check out these instructions for installing Chromium: https://www.chromium.org/getting-involved/download-chromium
Very nooby question, but I'm trying to install Atom text editor on Raspbian Stretch. Is it possible? I've heard because it runs on Electron, it's quite slow for Raspbian. I keep getting an error saying:
E: Unable to locate package atom
I'm following the official instructions for Debian. How can I fix this?
As of today you can't install the official package provided for Debian for its mismatching the hardware platform. Provided binary is for running on x86 hardware, but RPi doesn't come with an Intel/AMD processor, but ARM. So, you most probably need to build it from source yourself.
Primer
So, if you really want to build this from source, you should be aware of the waste of disk space caused by the IMHO poorly implemented build tool which is downloading tons of deps and copying and transpiling code around so you'll end up with 2GB+ of files with 80% accounting to dependencies, only. Since my RPi works with 8GB smartcard, only, I couldn't ever meet the need for disk space even though I was bleeding out Linux by manually removing docs, manpages, locales, ton's of outdated and mostly unused apps etc. The build also requires a whole build tooling chain, tons of dev packages for libraries, so there is a limit to milk the system ... 8GB disk drive simply isn't enough for this.
Eventually I tried moving all the files to a USB pen drive. But that drive must be formatted using a filesystem capable of symlinking. So you can't use vfat or FAT32. I didn't succeed to get a 16GB stick formatted with either version of extfs. The mkfs always ended up in a deadlock on trying to write its superblocks. Astonishingly, I couldn't even kill the mkfs with -KILL, but unplugging the drive did help in that case.
So, as a conclusion: here is a short list of steps I passed in expectation to get this working, but in the end I didn't finish due to the memory issues above. And frankly, I stopped caring ... I'd rather work with nano/vi in a terminal than using this ridiculous lego-like built software. I guess, atom is today's version of emacs with regards to the latter's acronym. Maybe you succeed with this, but I won't ...
Build from Source
Inspired by https://discuss.atom.io/t/atom-on-the-raspberry-pi/33332
Install toolchain for building native stuff
sudo apt-get install build-essential git libgnome-keyring-dev fakeroot gconf2 gconf-service libgtk2.0-0 libudev1 libgcrypt20 python rpm libsecret-1-dev xorg-dev
This set of tools was sufficient to build core files without error. Since I didn't start with a fresh installation of Raspbian there might have been some tool I have been using before, so maybe in your case there are more tools to be installed here. Look out for error messages in early stage of building and try to see if some library or header file isn't found. This mostly indicates lack of some package with name ending in -dev to be installed, too. Start by searching for the package using apt search <name-of-mentioned-library> and look for a package combining the missing library's name with suffix -dev. Then install it the usual way by invoking sudo apt-get install <package-name>.
Install up-to-date nodejs
Raspbian Stretch comes with support for NodeJS 8.11 which is basically okay. Install it and its package manager npm using this command:
sudo apt-get install node-js npm
Check installed versions with
node -v
npm -v
This should display 8.x.x on behalf of NodeJs. Use n afterwards if you want to step up:
sudo npm i -g n
sudo n lts
This will switch NodeJS to latest LTS release, which is 10.x as of now. Upgrading NodeJS is optional, but feel advised to always use latest version of npm:
sudo npm i -g npm
Check if upgrades succeeded:
node -v
npm -v
Adjust configuration of npm and install some essential dep:
sudo npm config set -g python /usr/bin/python2
sudo npm i -g node-gyp
Build Atom
Get the source. One option is to pull latest code from its repository:
git clone https://github.com/atom/atom.git
This is creating subfolder atom containing all source files. You might want to download sources of a recent release instead. But this tutorial was made with the sources fetched from Github. So make sure there is subfolder called atom containing sources similar to the ones fetched above.
It's time to start the beast:
cd atom
./script/build
This process will take a while. And it is the culprit that never finished on success in my case due to eating up all disk space over and over again.
Whenever the script fails on error, try to analyze the error, find the cause, fix it, then start the script by repeating the last command above again. If you don't remove any file in subfolder atom in between, the build script keeps passing steps of building atom it has passed successfully before.
Install atom
According to the original tutorial linked before the script should finish on success eventually. Then it's time to install with:
./script/grunt install
I guess this is causing atom to be available as a command from CLI. So, try it out. If everything looks fine you are finally ready to remove the waste of files in subfolder atom.
Feel free to report if this was working in your case.
From what I recall Atom runs 64-bit architecture; need the latest raspberry Pi.
run the following
wget https://atom.io/download/deb && dpkg -i deb
I'm trying to host a meteor app that uses an old version of meteor.
Every time i try to start the app it will get somewhat through the process of installing the tool, and then i see a message such as:
Killednloading meteor-tool#1.1.3... -
(note how killed somehow overwrites the downloading part of the command line)
Is there a reliable way to install the meteor tool at a specific version?
EDIT:
The Meteor team added a release parameter to their download endpoint. Now you can simply specify the desired version:
curl "https://install.meteor.com/?release=1.3.3.1" | sh
For Windows, a version parameter exists for the choco installer:
choco install meteor --version 1.3.3.1
Original solution
You can use sed for that. Insert it in the middle of curl and sh:
curl https://install.meteor.com/ | sed 's/1.4/1.3.3.1/' | sh
That will replace the release 1.4 (current version) to 1.3.3.1
When you create a meteor app you can specify a release:
meteor create test --release x.y.z
And when you update a meteor app you can do the same:
meteor update --release x.y.z
#Jorge Issa's answer is good if you are installing Meteor from scratch, on a system that never had Meteor installed, however it's subject to change since versions change all the time, so you need to adapt the sed line.
If you have any version of Meteor already installed, as Michel Floyd mentioned, you can always create a project with a specific version by adding the --release flag.
meteor update --release xxxx works fine with you're actually upgrading, but downgrading is a different story.
My recommendation when it comes to upgrading and eventually downgrading, is to use version control (git).
Attempt upgrade and if all is fine, you're in good shape, if not and you want to downgrade, simply clear the file changes in your version control system and use meteor reset to clean your project and rebuild with the previous version.
!Note! meteor reset clears the local mongo database too, so be sure to back that up first if you're going to do that (check mongodump and mongorestore for that)
finally, if you're looking to clean up the clutter from the .meteor folder, you can delete the folder and then run meteor reset in your project: the meteor executable will detect you don't have the needed packages will re-download the packages for the version needed by your project. (This takes a while and if you have many project, can be cumbersome as you need to do this in each project, but if like me you are looking to clear some space, this works fine.)
Try:
meteor update --release x.y.z
Try
choco install meteor --x86 --params="'/RELEASE:1.5.4.4'"