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?
I tried to add dependencies:
english_words: ^3.1.5 To my pupsec.yaml file, when I do and try the Flutter Pub Get command I get this error: Mathiass-MacBook-Pro:startuplabs_0 mathiassoderlund$ flutter pub get
Error on line 34, column 5 of pubspec.yaml: A dependency may only have one source.
╷
34 │ ┌ sdk: flutter
35 │ │
36 │ │ dependencies:
37 │ │ flutter:
38 │ │ sdk: flutter
39 │ │
40 │ │
41 │ │ english_words: ^3.1.5
42 │ │
43 │ │ # For information on the generic Dart part of this file, see the
44 │ │ # following page: https://dart.dev/tools/pub/pubspec
45 │ │
46 │ └ # The following section is specific to Flutter.
╵
Running "flutter pub get" in startuplabs_0...
pub get failed (65; ╵)
Mathiass-MacBook-Pro:startuplabs_0 mathiassoderlund$
Here is my pupspec.yaml file: Pupspec.yaml
You write it on the wrong place, Write it below cupertino_icons
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
english_words: ^3.1.5
Use proper indentation(spaces) in front of english_words.
The code should looks like this-
dependencies:
flutter:
sdk: flutter
english_words: ^3.1.5
Hope this will help you.
The problem occurs with the following command:
knex --knexfile config/db/knexfile.js migrate:latest
I get the following error:
Knex:warning - Pool2 - Error: Pool was destroyed
Knex:Error Pool2 - error: password authentication failed for user "dennis"
Knex:Error Pool2 - error: password authentication failed for user "dennis"
Error: Pool was destroyed
at Pool._destroyPool (/home/dennis/projects/amgen-sites/data-api/node_modules/pool2/lib/pool.js:560:20)
at Pool.<anonymous> (/home/dennis/projects/amgen-sites/data-api/node_modules/pool2/lib/pool.js:474:18)
at Pool.<anonymous> (/home/dennis/projects/amgen-sites/data-api/node_modules/pool2/lib/pool.js:517:17)
at tryCatcher (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/util.js:16:23)
at Promise.errorAdapter [as _rejectionHandler0] (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/nodeify.js:35:34)
at Promise._settlePromise (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/promise.js:558:21)
at Promise._settlePromise0 (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/promise.js:606:10)
at Promise._settlePromises (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/promise.js:681:18)
at Async._drainQueue (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues (/home/dennis/projects/amgen-sites/data-api/node_modules/knex/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:570:20)
at tryOnImmediate (timers.js:550:5)
at processImmediate [as _immediateCallback] (timers.js:529:5)
It seems like it is not using my UNIX account and instead trying to authenticate using username/password.
I have tried the following solutions:
Update pg to the latest
Update knex to the latest
replace the method to trust from:
# IPv4 local connections: host all all 127.0.0.1/32 trust
replace the connection string from [db name] to [postgres://[db name]:
connection: {
database: 'postgres://data-api-dev',
user: '',
password: ''
},
How to I get it to use my UNIX account?
I am on Ubuntu 16.04 using Node v6.3.1.
Here are my installed packages:
├── bluebird#2.10.2
├── body-parser#1.15.2
├── bookshelf#0.10.0
├── chai#3.5.0
├── chai-as-promised#5.3.0
├── colors#1.1.2
├── convict#1.4.0
├── cors#2.7.1
├── express#4.14.0
├── gulp#4.0.0-alpha.2 (git://github.com/gulpjs/gulp.git#d8f5c90a0622d19ef1943a2a3d02dc50e3c853e7)
├── gulp-exit#0.0.2
├── gulp-mocha#2.2.0
├── gulp-nodemon#2.1.0
├── gulp-using#0.1.0
├── jsonwebtoken#5.7.0
├── knex#0.11.10
├── lodash#3.10.1
├── pg#6.1.0
├── request-promise#0.4.3
├── sinon#1.17.5
├── sinon-as-promised#4.0.2
├── sinon-chai#2.8.0
├── supertest#1.2.0
└── validator#4.9.0
Turns out that renaming the method from md5 to trust was the correct solution. I forgot to restart the postgresql service after making the changes, thus it did not work the first time.
I am trying to clone this repo https://github.com/jbroquist/bookingappdemo built on mean stack and after doing npm install and npm install -g bower successfully when i do bower install i get this error
-bash: bower: command not found
When i run the app on the local servers i get these errors in the console
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/bootstrap/dist/css/bootstrap.min.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/angular-strap/dist/angular-strap.tpl.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/angular/angular.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/angular-route/angular-route.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/angular-animate/angular-animate.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/angular-cookies/angular-cookies.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/angular-motion/dist/angular-motion.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:7000/bower_components/angular-strap/dist/angular-strap.min.js
Uncaught ReferenceError: angular is not defined localhost:7000/app.js:3
Uncaught TypeError: Cannot read property 'factory' of undefined localhost:7000/js/services/config.js:3
Uncaught ReferenceError: angular is not defined localhost:7000/js/services/authentication.js:3
Uncaught ReferenceError: angular is not defined localhost:7000/js/services/eventutil.js:3
Uncaught ReferenceError: angular is not defined localhost:7000/js/services/GoogleCalendarService.js:1
Uncaught TypeError: Cannot read property 'controller' of undefined localhost:7000/js/controllers/MainController.js:3
Uncaught ReferenceError: angular is not defined localhost:7000/js/directives/InputField.js:1
This was the output of running npm install -g bower
/usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower
bower#1.3.9 /usr/local/lib/node_modules/bower
├── is-root#0.1.0
├── junk#0.3.0
├── stringify-object#0.2.1
├── abbrev#1.0.5
├── chmodr#0.1.0
├── which#1.0.5
├── osenv#0.1.0
├── opn#0.1.2
├── archy#0.0.2
├── graceful-fs#3.0.2
├── rimraf#2.2.8
├── bower-logger#0.2.2
├── bower-endpoint-parser#0.2.2
├── lru-cache#2.5.0
├── lockfile#0.4.3
├── nopt#3.0.1
├── retry#0.6.1
├── tmp#0.0.23
├── q#1.0.1
├── request-progress#0.3.1 (throttleit#0.0.2)
├── shell-quote#1.4.2 (array-filter#0.0.1, array-map#0.0.0, array-reduce#0.0.0, jsonify#0.0.0)
├── chalk#0.5.1 (escape-string-regexp#1.0.1, ansi-styles#1.1.0, supports-color#0.2.0, has-ansi#0.1.0, strip-ansi#0.3.0)
├── semver#2.3.2
├── p-throttler#0.0.1 (q#0.9.7)
├── bower-json#0.4.0 (intersect#0.0.3, deep-extend#0.2.11, graceful-fs#2.0.3)
├── promptly#0.2.0 (read#1.0.5)
├── fstream#0.1.31 (inherits#2.0.1)
├── mkdirp#0.5.0 (minimist#0.0.8)
├── fstream-ignore#0.0.6 (inherits#1.0.0, minimatch#0.2.14)
├── tar#0.1.20 (inherits#2.0.1, block-stream#0.0.7)
├── glob#4.0.5 (once#1.3.0, inherits#2.0.1, minimatch#1.0.0)
├── bower-config#0.5.2 (osenv#0.0.3, graceful-fs#2.0.3, optimist#0.6.1)
├── decompress-zip#0.0.6 (nopt#2.2.1, mkpath#0.1.0, touch#0.0.2, readable-stream#1.1.13, binary#0.3.0)
├── request#2.36.0 (json-stringify-safe#5.0.0, aws-sign2#0.5.0, forever-agent#0.5.2, qs#0.6.6, oauth-sign#0.3.0, tunnel-agent#0.4.0, node-uuid#1.4.1, mime#1.2.11, form-data#0.1.4, http-signature#0.10.0, hawk#1.0.0, tough-cookie#0.12.1)
├── update-notifier#0.2.0 (semver-diff#0.1.0, string-length#0.1.2, latest-version#0.2.0, configstore#0.3.1)
├── bower-registry-client#0.2.1 (graceful-fs#2.0.3, request-replay#0.2.0, lru-cache#2.3.1, async#0.2.10, mkdirp#0.3.5, request#2.27.0)
├── handlebars#1.3.0 (optimist#0.3.7, uglify-js#2.3.6)
├── mout#0.9.1
├── cardinal#0.4.4 (ansicolors#0.2.1, redeyed#0.4.4)
├── inquirer#0.5.1 (readline2#0.1.0, through#2.3.4, mute-stream#0.0.4, chalk#0.4.0, async#0.8.0, lodash#2.4.1, cli-color#0.3.2)
└── insight#0.4.3 (object-assign#1.0.0, async#0.9.0, lodash.debounce#2.4.1, os-name#1.0.0, tough-cookie#0.12.1, request#2.40.0, configstore#0.3.1, inquirer#0.6.0)