the vue-awesome-swiper dependency was not found - node.js

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?

Related

SyntaxError: Unexpected identifier 'pipefail'

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.

nuxt.js localhost:3000 not running

As I'm currently going from React to Vue.js, i failed with running my localhost on Port 3000. Getting the below error message. Looks like there is a problem with the server.
Down below a added the installation process so that it gets clearer how it's installed.
Also you can find the error message when running npm run dev.
Any suggestions what the problem could be?
Installation process
create-nuxt-app v5.0.0
✨ Generating Nuxt.js project in cryptocheck24.org
? Project name: cryptocheck24.org
? Programming language: JavaScript
? Package manager: Npm
? UI framework: None
? Template engine: HTML
? Nuxt.js modules: (Press <space> to select, <a> to toggle all, <i> to invert se
lection)
? Linting tools: (Press <space> to select, <a> to toggle all, <i> to invert sele
ction)
? Testing framework: Jest
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools: (Press <space> to select, <a> to toggle all, <i> to invert
selection)
? Continuous integration: None
? Version control system: Git
Error message
> cryptocheck24.org#1.0.0 dev
> nuxt
╭───────────────────────────────────────╮
│ │
│ Nuxt # v2.15.8 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
ℹ Preparing project for development 16:25:39
ℹ Initial build may take a while 16:25:39
ℹ Discovered Components: .nuxt/components/readme.md 16:25:39
✔ Builder initialized 16:25:39
✔ Nuxt files generated 16:25:39
● Client █████████████████████████ compiling (0%)
◯ Server
node:internal/crypto/hash:67
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:133:10)
at module.exports (/Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/lib/NormalModule.js:471:10)
at /Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/lib/NormalModule.js:503:5
at /Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/lib/NormalModule.js:358:12
at /Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at Array.<anonymous> (/Users/remo/Desktop/cryptocheck24.org/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Since the v5, a Node v14 version is required: https://github.com/nuxt/create-nuxt-app/releases/tag/v5.0.0
So you can either try that. It works on my side with the latest LTS: Node v16.
Or fallback into using the v4 of the CLI.
That version runs perfectly for ages already
npx create-nuxt-app my-cool-app
and is well battle-tested!
PS: I've opened this issue btw: https://github.com/nuxt/create-nuxt-app/issues/1014

Terraform init failed with Error: Failed to install provider read: connection reset by peer

Recently, I've got the problem when running terraoform init. The error showed as below:
>terraform init
Initializing modules...
Initializing the backend...
Initializing provider plugins...
- Reusing previous version of hashicorp/template from the dependency lock file
- Reusing previous version of cloudflare/cloudflare from the dependency lock file
- Reusing previous version of hashicorp/aws from the dependency lock file
- Reusing previous version of hashicorp/null from the dependency lock file
- Installing hashicorp/template v2.2.0...
- Using previously-installed cloudflare/cloudflare v3.18.0
- Installing hashicorp/aws v3.30.0...
- Installing hashicorp/null v3.1.1...
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/template v2.2.0: Get "https://releases.hashicorp.com/terraform-provider-template/2.2.0/terraform-provider-template_2.2.0_linux_amd64.zip": read tcp 10.250.192.121:45540->108.157.30.78:443: read:
│ connection reset by peer
╵
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/aws v3.30.0: Get "https://releases.hashicorp.com/terraform-provider-aws/3.30.0/terraform-provider-aws_3.30.0_linux_amd64.zip": read tcp 10.250.192.121:37686->108.157.30.40:443: read: connection reset
│ by peer
╵
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/null v3.1.1: Get "https://releases.hashicorp.com/terraform-provider-null/3.1.1/terraform-provider-null_3.1.1_linux_amd64.zip": read tcp 10.250.192.121:45552->108.157.30.78:443: read: connection reset
│ by peer
I suppose I need to add some additional configuration relating to network in my server? (IT team just added the new cert in the compary network system)

Unable to get local issuer certificate error while building kibana - yarn build

I am facing the unable to get local issuer certificate error when I try to build kibana using the command - yarn build --skip-os-packages
I have tried these solutions before which didn't work :
disabling TLS connection using set NODE_TLS_REJECT_UNAUTHORIZED=0 but then the build throws a warning and terminates the process.
yarn config set strict-ssl false
Below is the complete error :
yarn build --skip-os-packages
yarn run v1.22.17
$ node scripts/build --all-platforms --skip-os-packages
info [ global ] Verifying environment meets requirements
│ succ Node.js version verified
│ succ ✓ 0 sec
info [ global ] Cleaning artifacts from previous builds
│ debg Deleted 0 files/directories
│ succ ✓ 0 sec
info [ global ] Downloading node.js builds for all platforms
│ debg Downloading shasum values for node version 14.17.2 from https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v14.17.2/SHASUMS256.txt
│ERROR failure 1 sec
│ERROR Error: unable to get local issuer certificate
│ at TLSSocket.onConnectSecure (_tls_wrap.js:1514:34)
│ at TLSSocket.emit (events.js:375:28)
│ at TLSSocket._finishInit (_tls_wrap.js:936:8)
│ at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:708:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Why can't I add packages to flutter

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.

Resources