인프런 커뮤니티 질문&답변

송지훈님의 프로필 이미지
송지훈

작성한 질문수

리액트로 나만의 블로그 만들기(MERN Stack)

안녕하세요 . greenlock에서 오류가 발생합니다.

작성

·

275

0

C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog>npx greenlock init --config-dir ./server/config/greenlock.d --maintainer-email 'thdwlgnsl@naver.com'

(node:9388) UnhandledPromiseRejectionWarning: Error: missing or malformed `maintainerEmail` (or `author` from `package.json`), which is used as the contact for support notices

    at Object.Init._init (C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\lib\init.js:110:19)

    at Object.greenlock._create (C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\greenlock.js:58:22)

    at Object.G.create (C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\greenlock.js:482:15)

    at C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\bin\init.js:56:31

    at Object.CLI.main (C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\bin\lib\cli.js:176:5)

    at Object.<anonymous> (C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\bin\init.js:23:5)

    at Module._compile (internal/modules/cjs/loader.js:1137:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)

    at Module.load (internal/modules/cjs/loader.js:985:32)

    at Function.Module._load (internal/modules/cjs/loader.js:878:14)

    at Module.require (internal/modules/cjs/loader.js:1025:19)

    at require (internal/modules/cjs/helpers.js:72:18)

    at C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\bin\greenlock.js:18:9

    at Array.some (<anonymous>)

    at Object.<anonymous> (C:\Users\thdwl\OneDrive\바탕 화면\myBlog\blog\node_modules\@root\greenlock\bin\greenlock.js:16:3)

    at Module._compile (internal/modules/cjs/loader.js:1137:30)

(node:9388) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:9388) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

invalid maintainer contact info: null

app.all('*', (reqresnext=> {
  let protocol = req.headers['x-forward-proto'|| req.protocol;
  if (protocol === 'https') {
    // if(req.secure)
    next();
  } else {
    let to = `https://${req.hostname}${req.url}`;
    res.redirect(to);
  }
});

greenlock
  .init({
    packageRoot: path.join(__dirname, '../'),
    configDir: path.join(__dirname, '../''server/config/greenlock.d'),
    maintainerEmail: 'thdwlgnsl@naver.com',
    cluster: false,
  })
  .serve(app, () => {
    console.log('greenlock work');
 });

이유를 찾아 보곤 있는데 찾게 되면 바로 댓글 달겠습니다.

감사합니다.

항상 좋은 답변 감사합니다.

답변 1

0

싸플님의 프로필 이미지
싸플
지식공유자

혹시 뭔가 잘 안되셔서 여러번 작동시키신거 아니신가요? 

 Error: missing or malformed `maintainerEmail` (or `author` from `package.json`), which is used as the contact for support notices

여기 이렇게 에러 이유가 나와있네요. 한번 이메일 주소를 바꿔서 진행해보시길 권해드립니다. 

송지훈님의 프로필 이미지
송지훈

작성한 질문수

질문하기