TypeError: Cannot read property 'length' of undefined #1

Open
opened 2021-06-28 08:01:19 +00:00 by Ghost · 0 comments

Hi, I am learning javascript and I got this error about undefined property when I run my express project

PS C:\Users\Asriel\Desktop\Project> node server.js
C:\Users\Asriel\Desktop\Project\node_modules@root\greenlock-express\single.js:25
if (1 === fn.length) {
^

TypeError: Cannot read property 'length' of undefined
at Object.serve (C:\Users\Asriel\Desktop\Project\node_modules@root\greenlock-express\single.js:25:26)
at Object. (C:\Users\Asriel\Desktop\Project\server.js:17:6)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
PS C:\Users\Asriel\Desktop\Project>

Hi, I am learning javascript and I got this error about undefined property when I run my express project PS C:\Users\Asriel\Desktop\Project> node server.js C:\Users\Asriel\Desktop\Project\node_modules\@root\greenlock-express\single.js:25 if (1 === fn.length) { ^ TypeError: Cannot read property 'length' of undefined at Object.serve (C:\Users\Asriel\Desktop\Project\node_modules\@root\greenlock-express\single.js:25:26) at Object.<anonymous> (C:\Users\Asriel\Desktop\Project\server.js:17:6) at Module._compile (node:internal/modules/cjs/loader:1095:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10) at Module.load (node:internal/modules/cjs/loader:975:32) at Function.Module._load (node:internal/modules/cjs/loader:816:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) at node:internal/main/run_main_module:17:47 PS C:\Users\Asriel\Desktop\Project>
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coolaj86/greenlock-express.js#1
No description provided.