Popular New Releases in Ubuntu
neofetch
7.1.0
baseimage-docker
focal-1.0.0
docker-gitlab
14.9.2
AppImageKit
Continuous build
Squirrel.Windows
Squirrel.Windows 2.0.1
Popular Libraries in Ubuntu
by Nyr shell
13652 MIT
OpenVPN road warrior installer for Ubuntu, Debian, CentOS and Fedora
by dylanaraps shell
12800 MIT
🖼️ A command-line system information tool written in bash 3.2+
by phusion shell
8208 MIT
A minimal Ubuntu base image modified for Docker-friendliness
by andlabs go
7879 NOASSERTION
Platform-native GUI library for Go.
by angristan shell
7820 MIT
Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.
by judasn shell
7595 GPL-2.0
《Java 程序员眼中的 Linux》
by teddysun shell
7483
Auto Install Shadowsocks Server for CentOS/Debian/Ubuntu
by bingoogolapple c
7357
QRCode 扫描二维码、扫描条形码、相册获取图片后识别、生成带 Logo 二维码、支持微博微信 QQ 二维码扫描样式
by sameersbn shell
7221 MIT
Dockerized GitLab
Trending New libraries in Ubuntu
by Fmstrat shell
5316
Run Windows apps such as Microsoft Office/Adobe in Linux (Ubuntu/Fedora) and GNOME/KDE as if they were a part of the native OS, including Nautilus integration.
by BtbN shell
2521 MIT
by Gictorbit shell
2493 GPL-2.0
Photoshop CC v19 installer for Gnu/Linux
by v2fly shell
2424 GPL-3.0
Bash script for installing V2Ray in operating systems such as Debian / CentOS / Fedora / openSUSE that support systemd
by DustinBrett javascript
1456 MIT
Desktop environment in the browser.
by blocklistproject javascript
1266 Unlicense
Primary Block Lists
by kubesphere go
914 Apache-2.0
Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA 🔥 ⎈ 🐳
by omer-dogan shell
873 GPL-3.0
Whoami is a privacy tool developed to keep you anonymous on Debian-based linux operating systems at the highest level.
by Nyr shell
863 MIT
WireGuard road warrior installer for Ubuntu, Debian, CentOS and Fedora
Top Authors in Ubuntu
1
29 Libraries
75
2
25 Libraries
540
3
20 Libraries
5776
4
16 Libraries
592
5
15 Libraries
971
6
14 Libraries
137
7
14 Libraries
612
8
14 Libraries
144
9
14 Libraries
224
10
13 Libraries
45
1
29 Libraries
75
2
25 Libraries
540
3
20 Libraries
5776
4
16 Libraries
592
5
15 Libraries
971
6
14 Libraries
137
7
14 Libraries
612
8
14 Libraries
144
9
14 Libraries
224
10
13 Libraries
45
Trending Kits in Ubuntu
No Trending Kits are available at this moment for Ubuntu
Trending Discussions on Ubuntu
How to fix? "kex_exchange_identification: read: Connection reset by peer"
Error: require() of ES modules is not supported when importing node-fetch
NPM install task failing in Azure Devops, same code worked previously
Github Actions Failing
WARNING: Running pip as the 'root' user
How to open emulators in different windows at Android Studio (Bumblebee | 2021.1.1)?
How can I install kubectx on Ubuntu Linux 20.04?
MySQL Workbench SSL connection error: SSL is required but the server doesn't support it
Rails bundle install Could not find turbo-rails-7.1.1 in any of the sources
Flutter Web: Cannot scroll with mouse down (drag) (Flutter 2.5+)
QUESTION
How to fix? "kex_exchange_identification: read: Connection reset by peer"
Asked 2022-Mar-30 at 10:07I want to copy data with scp
in GitLab pipeline using PRIVATE_KEY
error is :
1kex_exchange_identification: read: Connection reset by peer
2Connection reset by x.x.x.x port 22
3lost connection
4
pipeline log:
1kex_exchange_identification: read: Connection reset by peer
2Connection reset by x.x.x.x port 22
3lost connection
4$ mkdir -p ~/.ssh
5$ echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
6$ chmod 600 ~/.ssh/id_rsa
7$ eval "$(ssh-agent -s)"
8Agent pid 22
9
10$ ssh-add ~/.ssh/id_rsa
11Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
12
13$ ssh-keyscan -H $IP >> ~/.ssh/known_hosts
14# x.x.x.x:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
15# x.x.x.x:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
16
17$ scp -rv api.yml root@$IP:/home/services/test/
18Executing: program /usr/bin/ssh host x.x.x.x, user root, command scp -v -r -t /home/services/test/
19
20OpenSSH_8.6p1, OpenSSL 1.1.1l 24 Aug 2021
21debug1: Reading configuration data /etc/ssh/ssh_config
22debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
23debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
24debug1: Connection established.
25debug1: identity file /root/.ssh/id_rsa type -1
26debug1: identity file /root/.ssh/id_rsa-cert type -1
27debug1: identity file /root/.ssh/id_dsa type -1
28debug1: identity file /root/.ssh/id_dsa-cert type -1
29debug1: identity file /root/.ssh/id_ecdsa type -1
30debug1: identity file /root/.ssh/id_ecdsa-cert type -1
31debug1: identity file /root/.ssh/id_ecdsa_sk type -1
32debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
33debug1: identity file /root/.ssh/id_ed25519 type -1
34debug1: identity file /root/.ssh/id_ed25519-cert type -1
35debug1: identity file /root/.ssh/id_ed25519_sk type -1
36debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
37debug1: identity file /root/.ssh/id_xmss type -1
38debug1: identity file /root/.ssh/id_xmss-cert type -1
39debug1: Local version string SSH-2.0-OpenSSH_8.6
40kex_exchange_identification: read: Connection reset by peer
41Connection reset by x.x.x.x port 22
42lost connection
43
ANSWER
Answered 2021-Sep-30 at 19:401kex_exchange_identification: read: Connection reset by peer
2Connection reset by x.x.x.x port 22
3lost connection
4$ mkdir -p ~/.ssh
5$ echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
6$ chmod 600 ~/.ssh/id_rsa
7$ eval "$(ssh-agent -s)"
8Agent pid 22
9
10$ ssh-add ~/.ssh/id_rsa
11Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
12
13$ ssh-keyscan -H $IP >> ~/.ssh/known_hosts
14# x.x.x.x:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
15# x.x.x.x:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.10
16
17$ scp -rv api.yml root@$IP:/home/services/test/
18Executing: program /usr/bin/ssh host x.x.x.x, user root, command scp -v -r -t /home/services/test/
19
20OpenSSH_8.6p1, OpenSSL 1.1.1l 24 Aug 2021
21debug1: Reading configuration data /etc/ssh/ssh_config
22debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
23debug1: Connecting to x.x.x.x [x.x.x.x] port 22.
24debug1: Connection established.
25debug1: identity file /root/.ssh/id_rsa type -1
26debug1: identity file /root/.ssh/id_rsa-cert type -1
27debug1: identity file /root/.ssh/id_dsa type -1
28debug1: identity file /root/.ssh/id_dsa-cert type -1
29debug1: identity file /root/.ssh/id_ecdsa type -1
30debug1: identity file /root/.ssh/id_ecdsa-cert type -1
31debug1: identity file /root/.ssh/id_ecdsa_sk type -1
32debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
33debug1: identity file /root/.ssh/id_ed25519 type -1
34debug1: identity file /root/.ssh/id_ed25519-cert type -1
35debug1: identity file /root/.ssh/id_ed25519_sk type -1
36debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
37debug1: identity file /root/.ssh/id_xmss type -1
38debug1: identity file /root/.ssh/id_xmss-cert type -1
39debug1: Local version string SSH-2.0-OpenSSH_8.6
40kex_exchange_identification: read: Connection reset by peer
41Connection reset by x.x.x.x port 22
42lost connection
43kex_exchange_identification: read: Connection reset by peer
44
When an ssh client connects to an ssh server, the server starts by sending a version string to the client. The error that you're getting means that the TCP connection from the client to the server was "abnormally closed" while the client was waiting for this data from the server, in other words immediately after the TCP connection was opened.
As a practical matter, it's likely to mean one of two things:
- The ssh server process malfunctioned (crashed), or perhaps it detected some serious issue causing it to exit immediately.
- Some firewall is interfering with connections to the ssh server.
It looks like the ssh-keyscan program was able to connect to the server and get a version string without an error. So the ssh server process is apparently able to talk to a client without crashing.
You should talk the administrators of this x.x.x.x host and the network that it's attached to, to see if they can identify the problem from their end. It's possible that something--a firewall, or the ssh server process itself--is seeing the multiple connections, first from the ssh-keyscan process, then by the scp program, as an intrusion attempt. And it's blocking the second connection attempt.
QUESTION
Error: require() of ES modules is not supported when importing node-fetch
Asked 2022-Mar-28 at 07:04I'm creating a program to analyze security camera streams and got stuck on the very first line. At the moment my .js file has nothing but the import of node-fetch and it gives me an error message. What am I doing wrong?
Running Ubuntu 20.04.2 LTS in Windows Subsystem for Linux.
Node version:
1user@MYLLYTIN:~/CAMSERVER$ node -v
2v14.17.6
3
node-fetch package version:
1user@MYLLYTIN:~/CAMSERVER$ node -v
2v14.17.6
3user@MYLLYTIN:~/CAMSERVER$ npm v node-fetch
4
5node-fetch@3.0.0 | MIT | deps: 2 | versions: 63
6A light-weight module that brings Fetch API to node.js
7https://github.com/node-fetch/node-fetch
8
9keywords: fetch, http, promise, request, curl, wget, xhr, whatwg
10
11dist
12.tarball: https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0.tgz
13.shasum: 79da7146a520036f2c5f644e4a26095f17e411ea
14.integrity: sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q==
15.unpackedSize: 75.9 kB
16
17dependencies:
18data-uri-to-buffer: ^3.0.1 fetch-blob: ^3.1.2
19
20maintainers:
21- endless <jimmy@warting.se>
22- bitinn <bitinn@gmail.com>
23- timothygu <timothygu99@gmail.com>
24- akepinski <npm@kepinski.ch>
25
26dist-tags:
27latest: 3.0.0 next: 3.0.0-beta.10
28
29published 3 days ago by endless <jimmy@warting.se>
30
esm package version:
1user@MYLLYTIN:~/CAMSERVER$ node -v
2v14.17.6
3user@MYLLYTIN:~/CAMSERVER$ npm v node-fetch
4
5node-fetch@3.0.0 | MIT | deps: 2 | versions: 63
6A light-weight module that brings Fetch API to node.js
7https://github.com/node-fetch/node-fetch
8
9keywords: fetch, http, promise, request, curl, wget, xhr, whatwg
10
11dist
12.tarball: https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0.tgz
13.shasum: 79da7146a520036f2c5f644e4a26095f17e411ea
14.integrity: sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q==
15.unpackedSize: 75.9 kB
16
17dependencies:
18data-uri-to-buffer: ^3.0.1 fetch-blob: ^3.1.2
19
20maintainers:
21- endless <jimmy@warting.se>
22- bitinn <bitinn@gmail.com>
23- timothygu <timothygu99@gmail.com>
24- akepinski <npm@kepinski.ch>
25
26dist-tags:
27latest: 3.0.0 next: 3.0.0-beta.10
28
29published 3 days ago by endless <jimmy@warting.se>
30user@MYLLYTIN:~/CAMSERVER$ npm v esm
31
32esm@3.2.25 | MIT | deps: none | versions: 140
33Tomorrow's ECMAScript modules today!
34https://github.com/standard-things/esm#readme
35
36keywords: commonjs, ecmascript, export, import, modules, node, require
37
38dist
39.tarball: https://registry.npmjs.org/esm/-/esm-3.2.25.tgz
40.shasum: 342c18c29d56157688ba5ce31f8431fbb795cc10
41.integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
42.unpackedSize: 308.6 kB
43
44maintainers:
45- jdalton <john.david.dalton@gmail.com>
46
47dist-tags:
48latest: 3.2.25
49
50published over a year ago by jdalton <john.david.dalton@gmail.com>
51
Contents of the .js file (literally nothing but the import):
1user@MYLLYTIN:~/CAMSERVER$ node -v
2v14.17.6
3user@MYLLYTIN:~/CAMSERVER$ npm v node-fetch
4
5node-fetch@3.0.0 | MIT | deps: 2 | versions: 63
6A light-weight module that brings Fetch API to node.js
7https://github.com/node-fetch/node-fetch
8
9keywords: fetch, http, promise, request, curl, wget, xhr, whatwg
10
11dist
12.tarball: https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0.tgz
13.shasum: 79da7146a520036f2c5f644e4a26095f17e411ea
14.integrity: sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q==
15.unpackedSize: 75.9 kB
16
17dependencies:
18data-uri-to-buffer: ^3.0.1 fetch-blob: ^3.1.2
19
20maintainers:
21- endless <jimmy@warting.se>
22- bitinn <bitinn@gmail.com>
23- timothygu <timothygu99@gmail.com>
24- akepinski <npm@kepinski.ch>
25
26dist-tags:
27latest: 3.0.0 next: 3.0.0-beta.10
28
29published 3 days ago by endless <jimmy@warting.se>
30user@MYLLYTIN:~/CAMSERVER$ npm v esm
31
32esm@3.2.25 | MIT | deps: none | versions: 140
33Tomorrow's ECMAScript modules today!
34https://github.com/standard-things/esm#readme
35
36keywords: commonjs, ecmascript, export, import, modules, node, require
37
38dist
39.tarball: https://registry.npmjs.org/esm/-/esm-3.2.25.tgz
40.shasum: 342c18c29d56157688ba5ce31f8431fbb795cc10
41.integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
42.unpackedSize: 308.6 kB
43
44maintainers:
45- jdalton <john.david.dalton@gmail.com>
46
47dist-tags:
48latest: 3.2.25
49
50published over a year ago by jdalton <john.david.dalton@gmail.com>
51user@MYLLYTIN:~/CAMSERVER$ cat server.js
52import fetch from "node-fetch";
53
Result:
1user@MYLLYTIN:~/CAMSERVER$ node -v
2v14.17.6
3user@MYLLYTIN:~/CAMSERVER$ npm v node-fetch
4
5node-fetch@3.0.0 | MIT | deps: 2 | versions: 63
6A light-weight module that brings Fetch API to node.js
7https://github.com/node-fetch/node-fetch
8
9keywords: fetch, http, promise, request, curl, wget, xhr, whatwg
10
11dist
12.tarball: https://registry.npmjs.org/node-fetch/-/node-fetch-3.0.0.tgz
13.shasum: 79da7146a520036f2c5f644e4a26095f17e411ea
14.integrity: sha512-bKMI+C7/T/SPU1lKnbQbwxptpCrG9ashG+VkytmXCPZyuM9jB6VU+hY0oi4lC8LxTtAeWdckNCTa3nrGsAdA3Q==
15.unpackedSize: 75.9 kB
16
17dependencies:
18data-uri-to-buffer: ^3.0.1 fetch-blob: ^3.1.2
19
20maintainers:
21- endless <jimmy@warting.se>
22- bitinn <bitinn@gmail.com>
23- timothygu <timothygu99@gmail.com>
24- akepinski <npm@kepinski.ch>
25
26dist-tags:
27latest: 3.0.0 next: 3.0.0-beta.10
28
29published 3 days ago by endless <jimmy@warting.se>
30user@MYLLYTIN:~/CAMSERVER$ npm v esm
31
32esm@3.2.25 | MIT | deps: none | versions: 140
33Tomorrow's ECMAScript modules today!
34https://github.com/standard-things/esm#readme
35
36keywords: commonjs, ecmascript, export, import, modules, node, require
37
38dist
39.tarball: https://registry.npmjs.org/esm/-/esm-3.2.25.tgz
40.shasum: 342c18c29d56157688ba5ce31f8431fbb795cc10
41.integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
42.unpackedSize: 308.6 kB
43
44maintainers:
45- jdalton <john.david.dalton@gmail.com>
46
47dist-tags:
48latest: 3.2.25
49
50published over a year ago by jdalton <john.david.dalton@gmail.com>
51user@MYLLYTIN:~/CAMSERVER$ cat server.js
52import fetch from "node-fetch";
53user@MYLLYTIN:~/CAMSERVER$ node -r esm server.js
54/home/user/CAMSERVER/node_modules/node-fetch/src/index.js:1
55Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/user/CAMSERVER/node_modules/node-fetch/src/index.js
56require() of ES modules is not supported.
57require() of /home/user/CAMSERVER/node_modules/node-fetch/src/index.js from /home/user/CAMSERVER/server.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
58Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/user/CAMSERVER/node_modules/node-fetch/package.json.
59
60 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1089:13) {
61 code: 'ERR_REQUIRE_ESM'
62}
63user@MYLLYTIN:~/CAMSERVER$
64
ANSWER
Answered 2022-Feb-25 at 00:00Use ESM syntax, also use one of these methods before running the file.
- specify
"type":"module"
inpackage.json
- Or use this flag
--input-type=module
when running the file - Or use
.mjs
file extension
QUESTION
NPM install task failing in Azure Devops, same code worked previously
Asked 2022-Mar-12 at 12:38I have yaml
pipeline running a build in Azure Devops. The Npm@1
task has started failing this morning. npm install
works locally with npm version 6.14.5 and it's all green lights on npm Status.
1pool:
2 name: 'Azure Pipelines'
3 vmImage: ubuntu-latest
4
5stages:
6 - stage:
7 variables:
8 buildConfiguration: "Release"
9 buildPlatform: "AnyCPU"
10 jobs:
11 - job:
12 steps:
13 - task: Npm@1
14 displayName: 'npm install'
15 inputs:
16 workingDir: Azure/MySite/ClientApp
17
Here's where things start to go wrong in the logs:
1pool:
2 name: 'Azure Pipelines'
3 vmImage: ubuntu-latest
4
5stages:
6 - stage:
7 variables:
8 buildConfiguration: "Release"
9 buildPlatform: "AnyCPU"
10 jobs:
11 - job:
12 steps:
13 - task: Npm@1
14 displayName: 'npm install'
15 inputs:
16 workingDir: Azure/MySite/ClientApp
17
181156 verbose pkgid node-sass@4.14.1
191157 verbose cwd /home/vsts/work/1/s/Azure/MySite/ClientApp
201158 verbose Linux 5.11.0-1021-azure
211159 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
221160 verbose node v16.13.0
231161 verbose npm v8.1.0
241162 error code 1
251163 error path /home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-sass
261164 error command failed
271165 error command sh -c node scripts/build.js
281166 error Building: /usr/local/bin/node /home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
291166 error make: Entering directory '/home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-sass/build'
301166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
311166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o ../src/libsass/src/ast_fwd_decl.cpp
321166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/backtrace.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/backtrace.o ../src/libsass/src/backtrace.cpp
331166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/base64vlq.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/base64vlq.o ../src/libsass/src/base64vlq.cpp
34
35
36
There hadn't been any changes to the package.json
in several months. Going by the error message, I've narrowed the problem down to something to do with note-sass
so here's a minimal package.json
to reproduce the error.
1pool:
2 name: 'Azure Pipelines'
3 vmImage: ubuntu-latest
4
5stages:
6 - stage:
7 variables:
8 buildConfiguration: "Release"
9 buildPlatform: "AnyCPU"
10 jobs:
11 - job:
12 steps:
13 - task: Npm@1
14 displayName: 'npm install'
15 inputs:
16 workingDir: Azure/MySite/ClientApp
17
181156 verbose pkgid node-sass@4.14.1
191157 verbose cwd /home/vsts/work/1/s/Azure/MySite/ClientApp
201158 verbose Linux 5.11.0-1021-azure
211159 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
221160 verbose node v16.13.0
231161 verbose npm v8.1.0
241162 error code 1
251163 error path /home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-sass
261164 error command failed
271165 error command sh -c node scripts/build.js
281166 error Building: /usr/local/bin/node /home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
291166 error make: Entering directory '/home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-sass/build'
301166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
311166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o ../src/libsass/src/ast_fwd_decl.cpp
321166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/backtrace.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/backtrace.o ../src/libsass/src/backtrace.cpp
331166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/base64vlq.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/base64vlq.o ../src/libsass/src/base64vlq.cpp
34
35
36{
37 "dependencies": {
38 "node-sass": "^4.14.1"
39 }
40}
41
42
ANSWER
Answered 2021-Dec-02 at 13:14I still don't know why this started failing all of a sudden but I have resolved the problem by updating node-sass
to version 6.0.1
.
1pool:
2 name: 'Azure Pipelines'
3 vmImage: ubuntu-latest
4
5stages:
6 - stage:
7 variables:
8 buildConfiguration: "Release"
9 buildPlatform: "AnyCPU"
10 jobs:
11 - job:
12 steps:
13 - task: Npm@1
14 displayName: 'npm install'
15 inputs:
16 workingDir: Azure/MySite/ClientApp
17
181156 verbose pkgid node-sass@4.14.1
191157 verbose cwd /home/vsts/work/1/s/Azure/MySite/ClientApp
201158 verbose Linux 5.11.0-1021-azure
211159 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
221160 verbose node v16.13.0
231161 verbose npm v8.1.0
241162 error code 1
251163 error path /home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-sass
261164 error command failed
271165 error command sh -c node scripts/build.js
281166 error Building: /usr/local/bin/node /home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
291166 error make: Entering directory '/home/vsts/work/1/s/Azure/MySite/ClientApp/node_modules/node-sass/build'
301166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
311166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast_fwd_decl.o ../src/libsass/src/ast_fwd_decl.cpp
321166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/backtrace.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/backtrace.o ../src/libsass/src/backtrace.cpp
331166 error g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/vsts/.node-gyp/16.13.0/include/node -I/home/vsts/.node-gyp/16.13.0/src -I/home/vsts/.node-gyp/16.13.0/deps/openssl/config -I/home/vsts/.node-gyp/16.13.0/deps/openssl/openssl/include -I/home/vsts/.node-gyp/16.13.0/deps/uv/include -I/home/vsts/.node-gyp/16.13.0/deps/zlib -I/home/vsts/.node-gyp/16.13.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++14 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/base64vlq.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/base64vlq.o ../src/libsass/src/base64vlq.cpp
34
35
36{
37 "dependencies": {
38 "node-sass": "^4.14.1"
39 }
40}
41
42{
43 "dependencies": {
44 "node-sass": "6.0.1"
45 }
46}
47
QUESTION
Github Actions Failing
Asked 2022-Feb-25 at 02:08Github Actions were working in my repository till yesterday. I didnt make any changes in .github/workflows/dev.yml file or in DockerFile.
But, suddenly in recent pushes, my Github Actions fail with the error
Setup, Build, Publish, and Deploy
1Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
2'/home/runner/work/_actions/GoogleCloudPlatform/github-actions/master/setup-gcloud'.
3Did you forget to run actions/checkout before running your local
4action?
5
May I know how to fix this
This is the sample .yml file I am using.
1Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
2'/home/runner/work/_actions/GoogleCloudPlatform/github-actions/master/setup-gcloud'.
3Did you forget to run actions/checkout before running your local
4action?
5name: Release to Development
6
7on:
8 push:
9 branches:
10 - 'master'
11jobs:
12 setup-build-publish-deploy:
13 name: Setup, Build, Publish, and Deploy
14 runs-on: ubuntu-latest
15 steps:
16
17 - name: Checkout
18 uses: actions/checkout@v2
19
20 # Setup gcloud CLI
21 - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
22 with:
23 version: '270.0.0'
24 service_account_email: ${{ secrets.GCLOUD_EMAIL_DEV }}
25 service_account_key: ${{ secrets.GCLOUD_AUTH_DEV }}
26
27 # Configure docker to use the gcloud command-line tool as a credential helper
28 - run: |
29 # Set up docker to authenticate
30 # via gcloud command-line tool.
31 gcloud auth configure-docker
32
33 # Build the Docker image
34 - name: Build
35 run: |
36 docker build -t "$REGISTRY_HOSTNAME"/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \
37 --build-arg GITHUB_SHA="$GITHUB_SHA" \
38 --build-arg GITHUB_REF="$GITHUB_REF" .
39
40 # Push the Docker image to Google Container Registry
41 - name: Publish
42 run: |
43 docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:$GITHUB_SHA
44
45 # Set up kustomize
46 - name: Set up Kustomize
47 run: |
48 curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
49 chmod u+x ./kustomize
50
51 # Deploy the Docker image to the GKE cluster
52 - name: Deploy
53 run: |
54
ANSWER
Answered 2021-Jul-27 at 13:24I fixed it by changing uses
value to
uses: google-github-actions/setup-gcloud@master
QUESTION
WARNING: Running pip as the 'root' user
Asked 2022-Feb-24 at 01:59I am making simple image of my python Django app in Docker. But at the end of the building container it throws next warning (I am building it on Ubuntu 20.04):
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2
Why does it throw this warning if I am installing Python requirements inside my image? I am building my image using:
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2sudo docker build -t my_app:1 .
3
Should I be worried about warning that pip throws, because I know it can break my system?
Here is my Dockerfile:
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2sudo docker build -t my_app:1 .
3FROM python:3.8-slim-buster
4
5WORKDIR /app
6
7COPY requirements.txt requirements.txt
8
9RUN pip install -r requirements.txt
10
11COPY . .
12
13CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
14
ANSWER
Answered 2021-Aug-29 at 08:12The way your container is built doesn't add a user, so everything is done as root.
You could create a user and install to that users's home directory by doing something like this;
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2sudo docker build -t my_app:1 .
3FROM python:3.8-slim-buster
4
5WORKDIR /app
6
7COPY requirements.txt requirements.txt
8
9RUN pip install -r requirements.txt
10
11COPY . .
12
13CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
14FROM python:3.8.3-alpine
15
16RUN pip install --upgrade pip
17
18RUN adduser -D myuser
19USER myuser
20WORKDIR /home/myuser
21
22COPY --chown=myuser:myuser requirements.txt requirements.txt
23RUN pip install --user -r requirements.txt
24
25ENV PATH="/home/myuser/.local/bin:${PATH}"
26
27COPY --chown=myuser:myuser . .
28
29CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
30
QUESTION
How to open emulators in different windows at Android Studio (Bumblebee | 2021.1.1)?
Asked 2022-Feb-22 at 19:06I have two running emulators but they open together in different tabs and in one single window.
How to open them in two different window?
1Android Studio Bumblebee | 2021.1.1
2Build #AI-211.7628.21.2111.8092744, built on January 19, 2022
3Runtime version: 11.0.11+0-b60-7590822 amd64
4VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
5Linux 5.4.0-96-generic
6GC: G1 Young Generation, G1 Old Generation
7Memory: 3072M
8Cores: 12
9Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
10Non-Bundled Plugins: JUnit4-Parallel-Runner (1.5), com.intellij.javafx (1.0.3), com.intellij.marketplace (211.7628.36), com.atlassian.bitbucket.references (2021.1.195), com.thoughtworks.gauge (211.6693.111), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), com.developerphil.adbidea (1.6.4)
11Current Desktop: ubuntu:GNOME
12
ANSWER
Answered 2022-Feb-17 at 10:47File->Settings->Tools->Emulator, and uncheck Launch in a tool window Then they will open in their own stand alone windows again.
QUESTION
How can I install kubectx on Ubuntu Linux 20.04?
Asked 2022-Feb-02 at 14:17I would like to install kubectx on Ubuntu 20.04. I couldn't find any info on how to do it. Any comment is much appreciated. Thanks!
ANSWER
Answered 2021-Dec-05 at 08:14This command should work:
1sudo apt install kubectx
2
If you want find completely install kubectx guide, you need to go to this github page. You can use an installation for Debian. APT stands for Advanced Package Tool. It is a set of core tools inside Debian and Ubuntu Linux system. You can use the apt command to install apps, delete or remove apps, keep Ubuntu/Debian server up to date and more. You can read more about it here.
It is possible that you should add the package deb http://ftp.de.debian.org/debian buster main
before you install kubectx
in the file /etc/apt/sources.list
and then run sudo apt-get update
. After that installation should work without problems.
QUESTION
MySQL Workbench SSL connection error: SSL is required but the server doesn't support it
Asked 2022-Jan-31 at 10:42Greetings I'm trying to connect with MySQL Workbench to localhost on Ubuntu 21.10 and I get this error "SSL connection error: SSL is required but the server doesn't support it" how can I fix it?
ANSWER
Answered 2021-Nov-03 at 16:53Consider the following steps:
- Open MySQL workbench
- right-click on the particular MySQL instance and select "Edit Connection"
- Select the "SSL" tab under Connection Method
- Select the drop-down for the "Use SSL" and choose "If Available" instead of "Required".
- Click the "Test Connection" button at the lower right connection to make sure you can now connect without errors.
You need to downgrade to a lower workbench version here in order to see more options in the drop-down from step 4.
QUESTION
Rails bundle install Could not find turbo-rails-7.1.1 in any of the sources
Asked 2022-Jan-21 at 18:20On a brand new digitalocean droplet running Ubuntu 20.10 with a brand new pretty near empty rails 7 alpha 2 app running bundle install
results in the following both when running cap production deploy on my local machine and when running from the command shell on the droplet
1Fetching gem metadata from https://rubygems.org/............
2Could not find turbo-rails-7.1.1 in any of the sources
3
I have no issues locally with this so this has to be an environment issue on the production server or some configuration option I've missed somehere. I am using latest stable rvm which is correctly configured,
1Fetching gem metadata from https://rubygems.org/............
2Could not find turbo-rails-7.1.1 in any of the sources
3rvm gemset list
4
5gemsets for ruby-3.0.0 (found in /home/comtechmaster/.rvm/gems/ruby-3.0.0)
6 (default)
7 global
8=> master_cms
9
10
I used a capistrano script to deploy the app and latest stable version node was installed using nvm. Bundler is the same version on both environments and turbo-rails-7.1.1 does not appear anywhere in my gemfile.lock
ANSWER
Answered 2021-Nov-09 at 14:37I ran into this also. Not sure why, but they yanked the 7.x versions and regressed to 0.8.x:
https://rubygems.org/gems/turbo-rails/versions/7.1.1
Just add this to your Gemfile:
1Fetching gem metadata from https://rubygems.org/............
2Could not find turbo-rails-7.1.1 in any of the sources
3rvm gemset list
4
5gemsets for ruby-3.0.0 (found in /home/comtechmaster/.rvm/gems/ruby-3.0.0)
6 (default)
7 global
8=> master_cms
9
10gem 'turbo-rails', '~> 0.8'
11
And then run and run ./bin/bundle update turbo-rails
and you should be good.
QUESTION
Flutter Web: Cannot scroll with mouse down (drag) (Flutter 2.5+)
Asked 2022-Jan-19 at 09:57I can confirm this issue happened in flutter above 2.5. Using 2.2.3 is fine. The question becomes why this feature been removed in 2.5 ? And how to enable it in flutter 2.5?
[Origin Question]I'm using SingleChildScrollView on flutter web with desktop browser. Scrolling only works on mouse wheel but not on mouse click (drag). How can I map mouse click to touch and scroll like mobile?
1import 'package:flutter/material.dart';
2
3void main() {
4 runApp(const MyApp());
5}
6
7class MyApp extends StatelessWidget {
8 const MyApp({Key? key}) : super(key: key);
9 @override
10 Widget build(BuildContext context) {
11 return MaterialApp(
12 title: 'Flutter Demo',
13 theme: ThemeData(
14 primarySwatch: Colors.blue,
15 ),
16 home: SingleChildScrollView(
17 child: Column(
18 children: List<Widget>.generate(50, (i) => Text(i.toString())).toList(),
19 ),
20 ),
21 );
22 }
23}
24
1import 'package:flutter/material.dart';
2
3void main() {
4 runApp(const MyApp());
5}
6
7class MyApp extends StatelessWidget {
8 const MyApp({Key? key}) : super(key: key);
9 @override
10 Widget build(BuildContext context) {
11 return MaterialApp(
12 title: 'Flutter Demo',
13 theme: ThemeData(
14 primarySwatch: Colors.blue,
15 ),
16 home: SingleChildScrollView(
17 child: Column(
18 children: List<Widget>.generate(50, (i) => Text(i.toString())).toList(),
19 ),
20 ),
21 );
22 }
23}
24flutter doctor -v
25[✓] Flutter (Channel master, 2.6.0-6.0.pre.6, on Ubuntu 20.04.3 LTS 5.11.0-34-generic, locale en_US.UTF-8)
26 • Flutter version 2.6.0-6.0.pre.6 at /home/XXX
27 • Upstream repository https://github.com/flutter/flutter.git
28 • Framework revision 0c5431d99c (12 days ago), 2021-09-05 22:31:02 -0400
29 • Engine revision b9c633900e
30 • Dart version 2.15.0 (build 2.15.0-82.0.dev)
31
32[✓] Chrome - develop for the web
33 • Chrome at google-chrome
34
35[✓] Connected device (2 available)
36 • Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.3 LTS 5.11.0-34-generic
37 • Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.82
38
ANSWER
Answered 2021-Sep-18 at 12:19Flutter change mouse scroll behavior after 2.5. See this for detail.
1import 'package:flutter/material.dart';
2
3void main() {
4 runApp(const MyApp());
5}
6
7class MyApp extends StatelessWidget {
8 const MyApp({Key? key}) : super(key: key);
9 @override
10 Widget build(BuildContext context) {
11 return MaterialApp(
12 title: 'Flutter Demo',
13 theme: ThemeData(
14 primarySwatch: Colors.blue,
15 ),
16 home: SingleChildScrollView(
17 child: Column(
18 children: List<Widget>.generate(50, (i) => Text(i.toString())).toList(),
19 ),
20 ),
21 );
22 }
23}
24flutter doctor -v
25[✓] Flutter (Channel master, 2.6.0-6.0.pre.6, on Ubuntu 20.04.3 LTS 5.11.0-34-generic, locale en_US.UTF-8)
26 • Flutter version 2.6.0-6.0.pre.6 at /home/XXX
27 • Upstream repository https://github.com/flutter/flutter.git
28 • Framework revision 0c5431d99c (12 days ago), 2021-09-05 22:31:02 -0400
29 • Engine revision b9c633900e
30 • Dart version 2.15.0 (build 2.15.0-82.0.dev)
31
32[✓] Chrome - develop for the web
33 • Chrome at google-chrome
34
35[✓] Connected device (2 available)
36 • Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.3 LTS 5.11.0-34-generic
37 • Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.82
38class MyCustomScrollBehavior extends MaterialScrollBehavior {
39 // Override behavior methods and getters like dragDevices
40 @override
41 Set<PointerDeviceKind> get dragDevices => {
42 PointerDeviceKind.touch,
43 PointerDeviceKind.mouse,
44 // etc.
45 };
46}
47
48// ScrollBehavior can be set for a specific widget.
49final ScrollController controller = ScrollController();
50ScrollConfiguration(
51 behavior: MyCustomScrollBehavior(),
52 child: ListView.builder(
53 controller: controller,
54 itemBuilder: (BuildContext context, int index) {
55 return Text('Item $index');
56 }
57 ),
58);
59
Community Discussions contain sources that include Stack Exchange Network
Tutorials and Learning Resources in Ubuntu
Tutorials and Learning Resources are not available at this moment for Ubuntu