I am having this issue when I try to deploy NodeJS app (built with NextJS) using pm2. I follow the instruction described here.
My attempt to execute pm2 start command seemed working, as shown by the snippet below.
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐ │ id │ name │ mode │ ↺ │ status │ cpu │ memory │ ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤ │ 0 │ experti │ fork │ 0 │ online │ 0% │ 25.7mb │ └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
But when I run pm2 list, the previous execution turned out to be error.
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐ │ id │ name │ mode │ ↺ │ status │ cpu │ memory │ ├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤ │ 0 │ process │ fork │ 15 │ errored │ 0% │ 0b │ └────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
I checked the pm2 logs as described by this answer and it led me to this log:
`
SyntaxError: Unexpected identifier 'pipefail'
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1088:15)
at Module._compile (node:internal/modules/cjs/loader:1123:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Object.<anonymous> (/home/equitica/.npm/_npx/5f7878ce38f1eb13/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
/home/<username>/.asdf/plugins/nodejs/shims/npm:4
set -o pipefail
^^^^^^^^
`
So, I checked the file that specified by the log, and found this line (shown below):
#! /usr/bin/env bash
set -eu
set -o pipefail <-- this line is probably the problem
I have no idea what the line means, and have no clue to solve the problem.
I solved this issue by removing the /home/<username>/.asdf/plugins/nodejs/shims/npm file and then execute pm2 start npm --name <process> -- run start.
I tried to use swiper plugin on my nuxtjs project. But I've got error on my command line when I running "yarn run dev":
`
yarn run dev
yarn run v1.22.19
$ nuxt
WARN sass-loader#13.1.0 is installed but ^10.1.1 is expected
╭───────────────────────────────────────╮
│ │
│ Nuxt # v2.15.8 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
i Preparing project for development
i Initial build may take a while
√ Builder initialized
√ Nuxt files generated
* Client █████████████████████████ building (39%) 245/251 modul
es 6 active
node_modules\setimmediate\setImmediate.js
× Server
Compiled with some errors in 9.04s
× Client
Compiled with some errors in 10.53s
× Server
Compiled with some errors in 9.04s
ERROR Failed to compile with 1 errors
This dependency was not found:
* vue-awesome-swiper/dist/ssr in ./plugins/swiper.js
To install it, you can run: npm install --save vue-awesome-swiper/dist/ssr
i Waiting for file changes
i Memory usage: 143 MB (RSS: 232 MB)
i Listening on: http://localhost:3000/
WARN Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'
`
vue-awesome-swiper does not detected while I've installed by "yarn add vue-awesome-swiper".
And I've followed this instruction on cmd:
npm install --save vue-awesome-swiper/dist/ssr
i Waiting for file changes
i Memory usage: 143 MB (RSS: 232 MB)
i Listening on: http://localhost:3000/
But still have issued on my code. Does anyone have same problems and had solution?
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I've tried many ways of getting the percentage but it will not work for Gain/Loss
╭──────────────╥────────┬────────╥────────╮
│ ║ Jan │ Feb │ Mar │
╞══════════════╬════════╪════════╪════════╡
│ Amount ║ 100 │ 1000 │ 100 │
├──────────────╫────────┼────────┼────────┤
│ Change % ║ 0 │ -88% │ 733% │ C2/B2-1
╞══════════════╬════════╪════════╪════════╡
│ Amount ║ 300000 │ 9000 │ 300000 │
├──────────────╫────────┼────────┼────────┤
│ Change % ║ 0 │ -97% │ 3233% │ C4/B4-1
╰──────────────╨────────┴────────┴────────╯
How can I get the correct result with Gain/Loss? as -97% can't be if the opposite is 3233%
I reversed it, I made it into an if function, if anyone else is wanting to know how to get a steady Plus/Minus from Gains and Losses this formula worked for me
=IF(C4<=B4,1-B4/C4,C4/B4-1)
I try to get data from the website via https and got the error with SSL certificate, but when I run on my mac - all works fine.
I also try with curl and got the same error,
curl: (35) error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
I run the parser in Docker container
My Dockerfile:
FROM python:3.7
WORKDIR /parser
COPY ./requirements.txt .
RUN python -m pip install --upgrade pip
RUN pip install -r requirements.txt
COPY . /parser
I get the error below:
Traceback (most recent call last): │
│ File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen │
│ chunked=chunked, │
│ File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request │
│ self._validate_conn(conn) │
│ File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn │
│ conn.connect() │
│ File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect │
│ ssl_context=context, │
│ File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket │
│ return context.wrap_socket(sock, server_hostname=server_hostname) │
│ File "/usr/local/lib/python3.7/ssl.py", line 423, in wrap_socket │
│ session=session │
│ File "/usr/local/lib/python3.7/ssl.py", line 870, in _create │
│ self.do_handshake() │
│ File "/usr/local/lib/python3.7/ssl.py", line 1139, in do_handshake │
│ self._sslobj.do_handshake() │
│ ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1076) │
│ During handling of the above exception, another exception occurred: │
│ Traceback (most recent call last): │
│ File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send │
│ timeout=timeout │
│ File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen │
│ method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] │
│ File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment │
│ raise MaxRetryError(_pool, url, error or ResponseError(cause)) │
│ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='life.pravda.com.ua', port=443): Max retries exceeded with url: /health/ (Caused by SSLError(SSLError(1, '[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1076)')) │
│ )
I resolved my problem with following commands in Dockerfile:
RUN apt-get update \
&& apt-get install openssl \
&& apt-get install ca-certificates
And also need to add python package pyopenssl in requirements.txt
I'm sure it's not about Docker or certificate but you're need to check which of protocols that server could talk, like this:
nmap --script ssl-enum-ciphers -p 443 this-is-your-site.com
then setup SSL context that should works in your case:
import ssl
ssl_context = ssl.create_default_context()
# Sets up old and insecure TLSv1.
ssl_context.options &= ~ssl.OP_NO_TLSv1_3 & ~ssl.OP_NO_TLSv1_2 & ~ssl.OP_NO_TLSv1_1
ssl_context.minimum_version = ssl.TLSVersion.TLSv1
and use custom HTTPAdapter for this mountpoint this-is-your-site.com.
I had this issue on Python 3.8.1, but not Python 3.7.4 using mysql-connector-python. Then switching to pymysql resolved it. Just a heads up for future readers.
Hello:) Got some problems with install of VisualEditor. I have to install Parsoid server and run it. But when I trying to parse some page, I'm getting an error:
TypeError: Cannot read property 'length' of undefined
at peg$c379 (eval at <anonymous> (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:89:38), <anonymous>:1356:61)
at peg$parseeof (eval at <anonymous> (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:89:38), <anonymous>:14738:12)
at peg$parsetlb (eval at <anonymous> (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:89:38), <anonymous>:2007:12)
at peg$parsetoplevelblock (eval at <anonymous> (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:89:38), <anonymous>:1909:12)
at Object.parse (eval at <anonymous> (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:89:38), <anonymous>:17872:18)
at PegTokenizer.tokenizeAsync (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:206:24)
at PegTokenizer._processText (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:180:8)
at PegTokenizer.process (/opt/bitnami/apps/parsoid/lib/mediawiki.tokenizer.peg.js:119:7)
at ParserPipeline.process (/opt/bitnami/apps/parsoid/lib/mediawiki.parser.js:485:21)
at Object.Util.processContentInPipeline (/opt/bitnami/apps/parsoid/lib/mediawiki.Util.js:1112:12)
This is not the same error like this, coz my express and connect versions look fine:
├── alea#0.0.9
├── async#0.9.0
├─┬ bunyan#1.0.1
│ └─┬ mv#2.0.3
│ ├─┬ mkdirp#0.5.0
│ │ └── minimist#0.0.8
│ ├── ncp#0.6.0
│ └── rimraf#2.2.8
├─┬ chai#1.9.2
│ ├── assertion-error#1.0.0
│ └─┬ deep-eql#0.1.3
│ └── type-detect#0.1.1
├── colors#0.6.2
├── diff#1.0.8
├── domino#1.0.18
├── entities#1.1.1
├── es6-shim#0.16.0
├─┬ express#2.5.11
│ ├─┬ connect#1.9.2
│ │ └── formidable#1.0.15
│ ├── mime#1.2.4
│ ├── mkdirp#0.3.0
│ └── qs#0.4.2
.......
I`ve got: NodeJS(v0.10.33), npm(2.1.5) on Ubuntu 14.04.1 LTS
Any ideas?:)
UPDATE:
I just noticed, that I can add new pages with VisualEditor and edit em, also i can edit already existing pages, but if there are no templates. If these pages have templates then there is an error previously described.
There was a problem with version (I got MW 1.23.6 (latest stable)).
I have to update to MediaWiki 1.24 and reinstall VisualEditor (Parsoid already exists in MW >1.24) and then it works fine without errors. Upstart on Ubuntu working well too.