質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

Q&A

解決済

1回答

3420閲覧

npm の serverless がインストールできない

MataSema

総合スコア15

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

0グッド

0クリップ

投稿2022/04/24 14:03

slsコマンドが使いたいのですが、
npmのserverlessのライブラリがインストールできません。

◆環境 
mac monterey 12.0.1
npm 8.1.0
node v16.12.0

以下のコマンドにて、インストールしました
npm install -g serverless

エラーができます。slsコマンドを打っても認識されません。

以下エラーが出ます。

npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated superagent@3.8.3: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases.

changed 391 packages, and audited 392 packages in 7s

52 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

エラー内容は

以下のライブラリが、
querystring,uuid,superagent,formidable

非推奨バージョン?
おそらく、言っているのだと思います。

◆試したこと
1 ncu を使ってインストール済みパッケージの新しいバージョンが存在するかどうか調べるが異常なし

Checking /Users/sedamasahiro/Documents/source/serverless_test/package.json
[====================] 4/4 100%

All dependencies match the latest package versions :)

2 npm update を実行したが変わらず。

3 node_modules を一度消して再実行したが、エラー内容が変わりません。

npm installや package.json周りの理解不足かもしれません。

お手数なのですが、
どなたかご教授いただけると助かります。

何卒よろしくお願い申し上げます。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

>以下エラーが出ます
>found 0 vulnerabilities

エラーはありません。
すべてWARN(注意事項)です。

serverlessを試してみましたが、nodeやnpmコマンドと同じ場所にインストールされました。

$ type node
node is /Users/owner/.nodenv/shims/node

$ type npm
npm is /Users/owner/.nodenv/shims/npm

$ type sls
sls is /Users/owner/.nodenv/shims/sls

$ type serverless
serverless is /Users/owner/.nodenv/shims/serverless

$ serverless --version
Framework Core: 3.15.2
Plugin: 6.2.2
SDK: 4.3.2

投稿2022/04/24 15:12

technocore

総合スコア7225

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

MataSema

2022/04/25 15:11

回答ありがとうございます。 type sls type serverless を入れてもコマンドが認識されず、 brew install serverless でインストールしたらうまくいきました。 (自己解決しました) また何かございましたらお願いいたします。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問