質問編集履歴
3
タイトル変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
npm run devのエラーを解決したいです。
|
body
CHANGED
File without changes
|
2
package.jsonの中身追記
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
ackagenpm run devのエラーを解決したいです。
|
body
CHANGED
@@ -80,7 +80,61 @@
|
|
80
80
|
```
|
81
81
|
|
82
82
|
|
83
|
+
### package.jsonの中身
|
84
|
+
```
|
85
|
+
{
|
86
|
+
"name": "functions",
|
87
|
+
"scripts": {
|
88
|
+
"dev": "cross-env DOTENV_CONFIG_PATH=./.env.development firebase emulators:start --only hosting,functions,firestore,pubsub --inspect-functions",
|
89
|
+
"lint": "eslint --ext .ts \"src/**/*\"",
|
90
|
+
"build": "cross-env DOTENV_CONFIG_PATH=./.env.production tsc",
|
91
|
+
"build:watch": "cross-env DOTENV_CONFIG_PATH=./.env.development tsc -w",
|
92
|
+
"serve": "npm run build && firebase emulators:start --only functions",
|
93
|
+
"shell": "npm run build && firebase functions:shell",
|
94
|
+
"start": "npm run shell",
|
95
|
+
"deploy": "cross-env DOTENV_CONFIG_PATH=./.env.production firebase deploy",
|
96
|
+
"logs": "firebase functions:log"
|
97
|
+
},
|
98
|
+
"engines": {
|
99
|
+
"node": "12"
|
100
|
+
},
|
101
|
+
"main": "lib/index.js",
|
102
|
+
"dependencies": {
|
103
|
+
"body-parser": "^1.19.0",
|
104
|
+
"core-js": "^3.8.3",
|
105
|
+
"cors": "^2.8.5",
|
106
|
+
"dotenv": "^8.2.0",
|
107
|
+
"express": "^4.17.1",
|
108
|
+
"firebase-admin": "^9.4.2",
|
109
|
+
"firebase-functions": "^3.13.1",
|
110
|
+
"moment": "^2.29.1",
|
111
|
+
"stripe": "^8.132.0"
|
112
|
+
},
|
113
|
+
"devDependencies": {
|
114
|
+
"@types/body-parser": "^1.19.0",
|
115
|
+
"@types/cors": "^2.8.9",
|
116
|
+
"@types/dotenv": "^8.2.0",
|
117
|
+
"@types/express": "^4.17.11",
|
118
|
+
"@types/moment": "^2.13.0",
|
119
|
+
"@types/node": "^14.14.22",
|
120
|
+
"@types/stripe": "^8.0.416",
|
121
|
+
"@typescript-eslint/eslint-plugin": "^4.14.1",
|
122
|
+
"@typescript-eslint/parser": "^4.14.1",
|
123
|
+
"cross-env": "^7.0.3",
|
124
|
+
"eslint": "^7.19.0",
|
125
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
126
|
+
"eslint-plugin-import": "^2.22.1",
|
127
|
+
"firebase-functions-test": "^0.2.3",
|
128
|
+
"laravel-mix": "^6.0.11",
|
129
|
+
"prettier": "^2.2.1",
|
130
|
+
"tsc-watch": "^4.2.9",
|
131
|
+
"typescript": "^4.1.3"
|
132
|
+
},
|
133
|
+
"private": true
|
134
|
+
}
|
83
135
|
|
136
|
+
```
|
137
|
+
|
84
138
|
### ここに言語名を入力
|
85
139
|
node.js
|
86
140
|
|
1
/Users/******/.npm/_logs/2021-02-03T07_42_34_328Z-debug.log の中身のソースを記載
title
CHANGED
File without changes
|
body
CHANGED
@@ -30,13 +30,61 @@
|
|
30
30
|
|
31
31
|
npm ERR! A complete log of this run can be found in:
|
32
32
|
npm ERR! /Users/******/.npm/_logs/2021-02-03T07_42_34_328Z-debug.log
|
33
|
+
```
|
34
|
+
### /Users/******/.npm/_logs/2021-02-03T07_42_34_328Z-debug.log ファイルの中身です
|
35
|
+
```
|
36
|
+
0 info it worked if it ends with ok
|
37
|
+
1 verbose cli [
|
38
|
+
1 verbose cli '/Users/tomoki/.nvm/versions/node/v12.0.0/bin/node',
|
39
|
+
1 verbose cli '/Users/tomoki/.nvm/versions/node/v12.0.0/bin/npm',
|
40
|
+
1 verbose cli 'run',
|
41
|
+
1 verbose cli 'dev'
|
42
|
+
1 verbose cli ]
|
43
|
+
2 info using npm@6.9.0
|
44
|
+
3 info using node@v12.0.0
|
45
|
+
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
|
46
|
+
5 info lifecycle functions@~predev: functions@
|
47
|
+
6 info lifecycle functions@~dev: functions@
|
48
|
+
7 verbose lifecycle functions@~dev: unsafe-perm in lifecycle true
|
49
|
+
8 verbose lifecycle functions@~dev: PATH: /Users/tomoki/.nvm/versions/node/v12.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/tomoki/limitedtime/functions/node_modules/.bin:/Users/tomoki/.npm-global/bin:/Users/tomoki/.nvm/versions/node/v12.0.0/bin:/Users/tomoki/.nodebrew/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
|
50
|
+
9 verbose lifecycle functions@~dev: CWD: /Users/tomoki/limitedtime/functions
|
51
|
+
10 silly lifecycle functions@~dev: Args: [
|
52
|
+
10 silly lifecycle '-c',
|
53
|
+
10 silly lifecycle 'cross-env DOTENV_CONFIG_PATH=./.env.development firebase ' +
|
54
|
+
10 silly lifecycle 'emulators:start --only hosting,functions,firestore,pubsub ' +
|
55
|
+
10 silly lifecycle '--inspect-functions'
|
56
|
+
10 silly lifecycle ]
|
57
|
+
11 silly lifecycle functions@~dev: Returned: code: 1 signal: null
|
58
|
+
12 info lifecycle functions@~dev: Failed to exec dev script
|
59
|
+
13 verbose stack Error: functions@ dev: `cross-env DOTENV_CONFIG_PATH=./.env.development firebase emulators:start --only hosting,functions,firestore,pubsub --inspect-functions`
|
60
|
+
13 verbose stack Exit status 1
|
61
|
+
13 verbose stack at EventEmitter.<anonymous> (/Users/tomoki/.nvm/versions/node/v12.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
|
62
|
+
13 verbose stack at EventEmitter.emit (events.js:196:13)
|
63
|
+
13 verbose stack at ChildProcess.<anonymous> (/Users/tomoki/.nvm/versions/node/v12.0.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
|
64
|
+
13 verbose stack at ChildProcess.emit (events.js:196:13)
|
65
|
+
13 verbose stack at maybeClose (internal/child_process.js:1000:16)
|
66
|
+
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
|
67
|
+
14 verbose pkgid functions@
|
68
|
+
15 verbose cwd /Users/tomoki/limitedtime/functions
|
69
|
+
16 verbose Darwin 20.2.0
|
70
|
+
17 verbose argv "/Users/tomoki/.nvm/versions/node/v12.0.0/bin/node" "/Users/tomoki/.nvm/versions/node/v12.0.0/bin/npm" "run" "dev"
|
71
|
+
18 verbose node v12.0.0
|
72
|
+
19 verbose npm v6.9.0
|
73
|
+
20 error code ELIFECYCLE
|
74
|
+
21 error errno 1
|
75
|
+
22 error functions@ dev: `cross-env DOTENV_CONFIG_PATH=./.env.development firebase emulators:start --only hosting,functions,firestore,pubsub --inspect-functions`
|
76
|
+
22 error Exit status 1
|
77
|
+
23 error Failed at the functions@ dev script.
|
78
|
+
23 error This is probably not a problem with npm. There is likely additional logging output above.
|
79
|
+
24 verbose exit [ 1, true ]
|
80
|
+
```
|
33
81
|
|
34
|
-
### 該当のソースコード
|
35
82
|
|
83
|
+
|
36
|
-
|
84
|
+
### ここに言語名を入力
|
37
85
|
node.js
|
38
|
-
```
|
39
86
|
|
87
|
+
|
40
88
|
### 試したこと
|
41
89
|
・node_modulesを消す→キャッシュクリア→再インストール
|
42
90
|
・
|