Tag Archives: YApi

Yapi platform deployment error (MAC must report error) solution

1. Deploy Yapi locally

According to the official documents, after the global installation of Yapi CLI and mongodb, the terminal executes Yapi server, and the browser enters 127.0.0.1:9090 to open the deployment page

After filling in the basic information, click Start deployment, wait for a period of time, the problem appears

node server/install.js

Error:internal/modules/cjs/loader.js:584
   throw err;

Errpr:Cannot find module 'nodemailer'
  at Function.Module_resolveFileName(.........)
  at Function.Module_resolveFileName(.........)
  ........

   

The reason for the error is probably the lack of nodemailer module, so I tried to install the module globally. After the installation, I still reported the same error. In this way, I kept looking for the error. I deleted the project and started over again. After repeated tossing and tossing, I was about to re install the system. After one afternoon’s tossing and tossing, I finally found a solution

2. Solutions

Due to the problem of MAC permission, Yapi is initialized according to the official document writing method, and finally there is no write permission in NPM, resulting in the loss of packets

Modify the “Yapi server” as

sudo yapi server

Then the project is deployed again and the problem is solved