estruyf / doctor

Doctor - Maintain your documentation on SharePoint without pain.
http://getdoctor.io
MIT License
112 stars 17 forks source link

[BUG] TypeError: Function.prototype.apply was called on undefined #161

Open mdg-utility opened 2 months ago

mdg-utility commented 2 months ago

Describe the bug Fresh install, I created a new folder and called doctor init but I received the following error:

TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
    at qo (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\node_modules\esm\esm.js:1:223175)
    at Uo (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\node_modules\esm\esm.js:1:222896)
    at  (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\node_modules\esm\esm.js:1:224488)
    at wu (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\node_modules\esm\esm.js:1:227324)
    at Eu (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\node_modules\esm\esm.js:1:227999)
    at Module.<anonymous> (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\node_modules\esm\esm.js:1:295976)
    at n (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\node_modules\esm\esm.js:1:279589)
    at Object.<anonymous> (C:\Users\username\.npm-global\node_modules\@estruyf\doctor\bin\doctor:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1434:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)

To Reproduce Steps to reproduce the behavior:

  1. In PowerShell 7, run doctor init

Expected behavior I expected it to create the initial folder structure.

Desktop (please complete the following information):

Additional context Fresh install of NodeJS and Doctor

npm i -g @estruyf/doctor
npm warn deprecated @pnp/cli-microsoft365@3.7.0-beta.b01397d: Preview version released
npm list -g --depth=0
C:\Users\username\.npm-global
+-- @estruyf/doctor@1.12.0
+-- @pnp/cli-microsoft365@7.8.1
+-- nodemon@3.1.0
+-- npm@10.8.0
+-- typescript@5.4.5
`-- yarn@1.22.22