簡體   English   中英

如何在 Mac 上安裝 Serverless?

[英]How can i install Serverless on a Mac?

我正在運行sudo npm install -g serverless

錯誤:

npm WARN deprecated mkdirp@0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! Unexpected end of JSON input while parsing near '...:{"name":"@babel/pars'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/AC/.npm/_logs/2020-03-30T21_11_07_100Z-debug.log

如果您使用的是 Windows:

  1. 以管理員身份打開 Windows Powershell
  2. npm cache clean --force : 清除緩存

如果您使用的是 Linux/Mac:

  1. sudo -i : 管理員權限
  2. npm cache clean --force

用這個:

sudo npm install -g --unsafe-perm=true --allow-root serverless

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM