관리 메뉴

이사작전.com IT Blog

[solved] firebase Cannot find module 'express' 본문

Framework/Google Firebase

[solved] firebase Cannot find module 'express'

말랑고양 플랫폼공작소 2018. 11. 26. 02:40

1. problem

Error : Cannot find module 'express' 


2. solution

I modified the package.json

You should enter the express information in dependencies.

the package.json is located in functions(folder).

your firebase project name > functions > package.json


package.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "lint": "eslint .",
    "serve": "firebase serve --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "dependencies": {
    "express": "^4.16.3",
    "firebase-admin": "~6.0.0",
    "firebase-functions": "^2.0.3"
  },
  "devDependencies": {
    "eslint": "^4.12.0",
    "eslint-plugin-promise": "^3.6.0"
  },
  "private": true
}
cs


good luck!

#firebase #module #express



0 Comments
댓글쓰기 폼
Prev 1 2 3 4 5 6 7 8 9 10 11 Next