feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
14.97k stars 742 forks source link

"Creating an app" instructions fail without significant further undocumented action (Win11) #3409

Closed ericblade closed 5 months ago

ericblade commented 5 months ago

log of all steps required to make the "creating an app" instructions actually work

G:\grocy-micro-ui>npm run compile

> grocy-micro-ui@0.0.0 compile
> shx rm -rf lib/ && tsc

'shx' is not recognized as an internal or external command,
operable program or batch file.

G:\grocy-micro-ui>npm install --save-dev shx

added 22 packages, and audited 23 packages in 2s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm run compile

> grocy-micro-ui@0.0.0 compile
> shx rm -rf lib/ && tsc

'tsc' is not recognized as an internal or external command,
operable program or batch file.

G:\grocy-micro-ui>npm install --save-dev typescript

added 1 package, and audited 24 packages in 1s

6 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm run compile

> grocy-micro-ui@0.0.0 compile
> shx rm -rf lib/ && tsc

src/app.ts:2:26 - error TS2307: Cannot find module '@feathersjs/feathers' or its corresponding type declarations.

2 import { feathers } from '@feathersjs/feathers'
                           ~~~~~~~~~~~~~~~~~~~~~~

src/app.ts:3:27 - error TS2307: Cannot find module '@feathersjs/configuration' or its corresponding type declarations.

3 import configuration from '@feathersjs/configuration'
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/app.ts:4:93 - error TS2307: Cannot find module '@feathersjs/koa' or its corresponding type declarations.

4 import { koa, rest, bodyParser, errorHandler, parseAuthentication, cors, serveStatic } from '@feathersjs/koa'
                                                                                              ~~~~~~~~~~~~~~~~~

src/app.ts:5:22 - error TS2307: Cannot find module '@feathersjs/socketio' or its corresponding type declarations.

5 import socketio from '@feathersjs/socketio'
                       ~~~~~~~~~~~~~~~~~~~~~~

src/channels.ts:2:49 - error TS2307: Cannot find module '@feathersjs/feathers' or its corresponding type declarations.

2 import type { RealTimeConnection, Params } from '@feathersjs/feathers'
                                                  ~~~~~~~~~~~~~~~~~~~~~~

src/channels.ts:3:43 - error TS2307: Cannot find module '@feathersjs/authentication' or its corresponding type declarations.

3 import type { AuthenticationResult } from '@feathersjs/authentication'
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/client.ts:2:26 - error TS2307: Cannot find module '@feathersjs/feathers' or its corresponding type declarations.

2 import { feathers } from '@feathersjs/feathers'
                           ~~~~~~~~~~~~~~~~~~~~~~

src/client.ts:3:55 - error TS2307: Cannot find module '@feathersjs/feathers' or its corresponding type declarations.

3 import type { TransportConnection, Application } from '@feathersjs/feathers'
                                                        ~~~~~~~~~~~~~~~~~~~~~~

src/client.ts:4:34 - error TS2307: Cannot find module '@feathersjs/authentication-client' or its corresponding type declarations.

4 import authenticationClient from '@feathersjs/authentication-client'
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/client.ts:5:50 - error TS2307: Cannot find module '@feathersjs/authentication-client' or its corresponding type declarations.

5 import type { AuthenticationClientOptions } from '@feathersjs/authentication-client'
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/configuration.ts:1:61 - error TS2307: Cannot find module '@feathersjs/typebox' or its corresponding type declarations.

1 import { Type, getValidator, defaultAppConfiguration } from '@feathersjs/typebox'
                                                              ~~~~~~~~~~~~~~~~~~~~~

src/configuration.ts:2:29 - error TS2307: Cannot find module '@feathersjs/typebox' or its corresponding type declarations.

2 import type { Static } from '@feathersjs/typebox'
                              ~~~~~~~~~~~~~~~~~~~~~

src/declarations.ts:2:66 - error TS2307: Cannot find module '@feathersjs/feathers' or its corresponding type declarations.

2 import { HookContext as FeathersHookContext, NextFunction } from '@feathersjs/feathers'
                                                                   ~~~~~~~~~~~~~~~~~~~~~~

src/declarations.ts:3:52 - error TS2307: Cannot find module '@feathersjs/koa' or its corresponding type declarations.

3 import { Application as FeathersApplication } from '@feathersjs/koa'
                                                     ~~~~~~~~~~~~~~~~~

src/index.ts:7:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

7 process.on('unhandledRejection', (reason) => logger.error('Unhandled Rejection %O', reason))
  ~~~~~~~

src/index.ts:7:35 - error TS7006: Parameter 'reason' implicitly has an 'any' type.

7 process.on('unhandledRejection', (reason) => logger.error('Unhandled Rejection %O', reason))
                                    ~~~~~~

src/logger.ts:2:50 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

2 import { createLogger, format, transports } from 'winston'
                                                   ~~~~~~~~~

src/validators.ts:2:33 - error TS2307: Cannot find module '@feathersjs/schema' or its corresponding type declarations.

2 import { Ajv, addFormats } from '@feathersjs/schema'
                                  ~~~~~~~~~~~~~~~~~~~~

src/validators.ts:3:43 - error TS2307: Cannot find module '@feathersjs/schema' or its corresponding type declarations.

3 import type { FormatsPluginOptions } from '@feathersjs/schema'
                                            ~~~~~~~~~~~~~~~~~~~~

Found 19 errors in 8 files.

Errors  Files
     4  src/app.ts:2
     2  src/channels.ts:2
     4  src/client.ts:2
     2  src/configuration.ts:1
     2  src/declarations.ts:2
     2  src/index.ts:7
     1  src/logger.ts:2
     2  src/validators.ts:2

G:\grocy-micro-ui>npm install @feathersjs/feathers --save

added 4 packages, and audited 28 packages in 2s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm run compile

> grocy-micro-ui@0.0.0 compile
> shx rm -rf lib/ && tsc

node_modules/@feathersjs/feathers/lib/application.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.

1 /// <reference types="node" />
                        ~~~~

node_modules/@feathersjs/feathers/lib/application.d.ts:2:30 - error TS7016: Could not find a declaration file for module 'events'. 'G:/grocy-micro-ui/node_modules/events/events.js' implicitly has an 'any' type.      
  Try `npm i --save-dev @types/events` if it exists or add a new declaration (.d.ts) file containing `declare module 'events';`

2 import { EventEmitter } from 'events';
                               ~~~~~~~~

node_modules/@feathersjs/feathers/lib/declarations.d.ts:1:23 - error TS2688: Cannot find type definition file for 'node'.

1 /// <reference types="node" />
                        ~~~~

node_modules/@feathersjs/feathers/lib/declarations.d.ts:2:30 - error TS7016: Could not find a declaration file for module 'events'. 'G:/grocy-micro-ui/node_modules/events/events.js' implicitly has an 'any' type.     
  Try `npm i --save-dev @types/events` if it exists or add a new declaration (.d.ts) file containing `declare module 'events';`

2 import { EventEmitter } from 'events';
                               ~~~~~~~~

src/app.ts:3:27 - error TS2307: Cannot find module '@feathersjs/configuration' or its corresponding type declarations.

3 import configuration from '@feathersjs/configuration'
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/app.ts:4:93 - error TS2307: Cannot find module '@feathersjs/koa' or its corresponding type declarations.

4 import { koa, rest, bodyParser, errorHandler, parseAuthentication, cors, serveStatic } from '@feathersjs/koa'
                                                                                              ~~~~~~~~~~~~~~~~~

src/app.ts:5:22 - error TS2307: Cannot find module '@feathersjs/socketio' or its corresponding type declarations.

5 import socketio from '@feathersjs/socketio'
                       ~~~~~~~~~~~~~~~~~~~~~~

src/channels.ts:3:43 - error TS2307: Cannot find module '@feathersjs/authentication' or its corresponding type declarations.

3 import type { AuthenticationResult } from '@feathersjs/authentication'
                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/channels.ts:18:56 - error TS2339: Property 'connection' does not exist on type 'Params<Query>'.

18   app.on('login', (authResult: AuthenticationResult, { connection }: Params) => {
                                                          ~~~~~~~~~~

src/client.ts:4:34 - error TS2307: Cannot find module '@feathersjs/authentication-client' or its corresponding type declarations.

4 import authenticationClient from '@feathersjs/authentication-client'
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/client.ts:5:50 - error TS2307: Cannot find module '@feathersjs/authentication-client' or its corresponding type declarations.

5 import type { AuthenticationClientOptions } from '@feathersjs/authentication-client'
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/configuration.ts:1:61 - error TS2307: Cannot find module '@feathersjs/typebox' or its corresponding type declarations.

1 import { Type, getValidator, defaultAppConfiguration } from '@feathersjs/typebox'
                                                              ~~~~~~~~~~~~~~~~~~~~~

src/configuration.ts:2:29 - error TS2307: Cannot find module '@feathersjs/typebox' or its corresponding type declarations.

2 import type { Static } from '@feathersjs/typebox'
                              ~~~~~~~~~~~~~~~~~~~~~

src/declarations.ts:3:52 - error TS2307: Cannot find module '@feathersjs/koa' or its corresponding type declarations.

3 import { Application as FeathersApplication } from '@feathersjs/koa'
                                                     ~~~~~~~~~~~~~~~~~

src/index.ts:7:1 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

7 process.on('unhandledRejection', (reason) => logger.error('Unhandled Rejection %O', reason))
  ~~~~~~~

src/index.ts:7:35 - error TS7006: Parameter 'reason' implicitly has an 'any' type.

7 process.on('unhandledRejection', (reason) => logger.error('Unhandled Rejection %O', reason))
                                    ~~~~~~

src/logger.ts:2:50 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

2 import { createLogger, format, transports } from 'winston'
                                                   ~~~~~~~~~

src/validators.ts:2:33 - error TS2307: Cannot find module '@feathersjs/schema' or its corresponding type declarations.

2 import { Ajv, addFormats } from '@feathersjs/schema'
                                  ~~~~~~~~~~~~~~~~~~~~

src/validators.ts:3:43 - error TS2307: Cannot find module '@feathersjs/schema' or its corresponding type declarations.

3 import type { FormatsPluginOptions } from '@feathersjs/schema'
                                            ~~~~~~~~~~~~~~~~~~~~

Found 19 errors in 10 files.

Errors  Files
     2  node_modules/@feathersjs/feathers/lib/application.d.ts:1
     2  node_modules/@feathersjs/feathers/lib/declarations.d.ts:1
     3  src/app.ts:3
     2  src/channels.ts:3
     2  src/client.ts:4
     2  src/configuration.ts:1
     1  src/declarations.ts:3
     2  src/index.ts:7
     1  src/logger.ts:2
     2  src/validators.ts:2

G:\grocy-micro-ui>npm install @feathersjs/socketio @feathersjs/koa --save

added 154 packages, and audited 182 packages in 9s

30 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm run compile

> grocy-micro-ui@0.0.0 compile
> shx rm -rf lib/ && tsc

src/app.ts:3:27 - error TS2307: Cannot find module '@feathersjs/configuration' or its corresponding type declarations.

3 import configuration from '@feathersjs/configuration'
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/app.ts:20:29 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

20 app.use(serveStatic(app.get('public')))
                               ~~~~~~~~

src/app.ts:30:23 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

30       origin: app.get('origins')
                         ~~~~~~~~~

src/client.ts:4:34 - error TS2307: Cannot find module '@feathersjs/authentication-client' or its corresponding type declarations.

4 import authenticationClient from '@feathersjs/authentication-client'
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/client.ts:5:50 - error TS2307: Cannot find module '@feathersjs/authentication-client' or its corresponding type declarations.

5 import type { AuthenticationClientOptions } from '@feathersjs/authentication-client'
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/configuration.ts:1:61 - error TS2307: Cannot find module '@feathersjs/typebox' or its corresponding type declarations.

1 import { Type, getValidator, defaultAppConfiguration } from '@feathersjs/typebox'
                                                              ~~~~~~~~~~~~~~~~~~~~~

src/configuration.ts:2:29 - error TS2307: Cannot find module '@feathersjs/typebox' or its corresponding type declarations.

2 import type { Static } from '@feathersjs/typebox'
                              ~~~~~~~~~~~~~~~~~~~~~

src/index.ts:4:22 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

4 const port = app.get('port')
                       ~~~~~~

src/index.ts:5:22 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'.

5 const host = app.get('host')
                       ~~~~~~

src/logger.ts:2:50 - error TS2307: Cannot find module 'winston' or its corresponding type declarations.

2 import { createLogger, format, transports } from 'winston'
                                                   ~~~~~~~~~

Found 10 errors in 5 files.

Errors  Files
     3  src/app.ts:3
     2  src/client.ts:4
     2  src/configuration.ts:1
     2  src/index.ts:4
     1  src/logger.ts:2

G:\grocy-micro-ui>npm install --save winston @feathersjs/typebox @feathersjs/authentication-client @feathersjs/configuration

added 34 packages, and audited 216 packages in 3s

34 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm run compile

> grocy-micro-ui@0.0.0 compile
> shx rm -rf lib/ && tsc

G:\grocy-micro-ui>npm run migrate
npm ERR! Missing script: "migrate"
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in: C:\Users\EricB\AppData\Local\npm-cache\_logs\2024-01-29T08_11_35_543Z-debug-0.log

G:\grocy-micro-ui>npm start

> grocy-micro-ui@0.0.0 start
> node lib/

warn: Publishing all events to all authenticated users. See `channels.ts` and https://dove.feathersjs.com/api/channels.html for more information.
info: Feathers app listening on http://localhost:3030

bonus additional steps required to make npm test work that are not in the documentation

G:\grocy-micro-ui>npm test

> grocy-micro-ui@0.0.0 test
> npm run mocha

> grocy-micro-ui@0.0.0 mocha
> cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit

'cross-env' is not recognized as an internal or external command,
operable program or batch file.

G:\grocy-micro-ui>npm install --save-dev cross-env

added 7 packages, and audited 223 packages in 1s

34 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm test

> grocy-micro-ui@0.0.0 test
> npm run mocha

> grocy-micro-ui@0.0.0 mocha
> cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit

'mocha' is not recognized as an internal or external command,
operable program or batch file.
node:events:492
      throw er; // Unhandled 'error' event
      ^

Error: spawn mocha ENOENT
    at notFoundError (G:\grocy-micro-ui\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (G:\grocy-micro-ui\node_modules\cross-spawn\lib\enoent.js:40:16)
    at cp.emit (G:\grocy-micro-ui\node_modules\cross-spawn\lib\enoent.js:27:25)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
Emitted 'error' event on ChildProcess instance at:
    at cp.emit (G:\grocy-micro-ui\node_modules\cross-spawn\lib\enoent.js:30:37)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn mocha',
  path: 'mocha',
  spawnargs: [
    'test/',
    '--require',
    'ts-node/register',
    '--recursive',
    '--extension',
    '.ts',
    '--exit'
  ]
}

Node.js v20.10.0

G:\grocy-micro-ui>npm install --save-dev mocha

added 64 packages, and audited 287 packages in 3s

53 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm test

> grocy-micro-ui@0.0.0 test
> npm run mocha

> grocy-micro-ui@0.0.0 mocha
> cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit

✖ ERROR: Error: Cannot find module 'ts-node/register'
Require stack:
- G:\grocy-micro-ui\node_modules\mocha\lib\nodejs\esm-utils.js
- G:\grocy-micro-ui\node_modules\mocha\lib\mocha.js
- G:\grocy-micro-ui\node_modules\mocha\lib\cli\one-and-dones.js
- G:\grocy-micro-ui\node_modules\mocha\lib\cli\options.js
- G:\grocy-micro-ui\node_modules\mocha\bin\mocha.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at exports.requireOrImport (G:\grocy-micro-ui\node_modules\mocha\lib\nodejs\esm-utils.js:53:16)
    at async exports.handleRequires (G:\grocy-micro-ui\node_modules\mocha\lib\cli\run-helpers.js:94:28)
    at async G:\grocy-micro-ui\node_modules\mocha\lib\cli\run.js:349:25 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'G:\\grocy-micro-ui\\node_modules\\mocha\\lib\\nodejs\\esm-utils.js',
    'G:\\grocy-micro-ui\\node_modules\\mocha\\lib\\mocha.js',
    'G:\\grocy-micro-ui\\node_modules\\mocha\\lib\\cli\\one-and-dones.js',
    'G:\\grocy-micro-ui\\node_modules\\mocha\\lib\\cli\\options.js',
    'G:\\grocy-micro-ui\\node_modules\\mocha\\bin\\mocha.js'
  ]
}

G:\grocy-micro-ui>npm install --save-dev ts-node

added 17 packages, and audited 304 packages in 3s

53 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm test

> grocy-micro-ui@0.0.0 test
> npm run mocha

> grocy-micro-ui@0.0.0 mocha
> cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit

TSError: ⨯ Unable to compile TypeScript:
test/app.test.ts:3:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

3 import axios from 'axios'
                    ~~~~~~~
test/app.test.ts:10:1 - error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.

10 describe('Feathers application tests', () => {
   ~~~~~~~~
test/app.test.ts:13:3 - error TS2304: Cannot find name 'before'.

13   before(async () => {
     ~~~~~~
test/app.test.ts:17:3 - error TS2304: Cannot find name 'after'.

17   after(async () => {
     ~~~~~
test/app.test.ts:21:3 - error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.

21   it('starts and shows the index page', async () => {
     ~~
test/app.test.ts:27:3 - error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.

27   it('shows a 404 JSON error', async () => {
     ~~

    at createTSError (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:859:12)
    at reportTSError (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:863:19)
    at getOutput (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1077:36)
    at Object.compile (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1433:41)
    at Module.m._compile (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Object.require.extensions.<computed> [as .ts] (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.exports.requireOrImport (G:\grocy-micro-ui\node_modules\mocha\lib\nodejs\esm-utils.js:53:16)
    at async Object.exports.loadFilesAsync (G:\grocy-micro-ui\node_modules\mocha\lib\nodejs\esm-utils.js:100:20)
    at async singleRun (G:\grocy-micro-ui\node_modules\mocha\lib\cli\run-helpers.js:125:3)
    at async Object.exports.handler (G:\grocy-micro-ui\node_modules\mocha\lib\cli\run.js:370:5)

G:\grocy-micro-ui>npm install --save-dev axios @types/mocha

added 8 packages, and audited 312 packages in 2s

54 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm test

> grocy-micro-ui@0.0.0 test
> npm run mocha

> grocy-micro-ui@0.0.0 mocha
> cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit

warn: Publishing all events to all authenticated users. See `channels.ts` and https://dove.feathersjs.com/api/channels.html for more information.

TSError: ⨯ Unable to compile TypeScript:
test/client.test.ts:7:18 - error TS2307: Cannot find module '@feathersjs/rest-client' or its corresponding type declarations.

7 import rest from '@feathersjs/rest-client'
                   ~~~~~~~~~~~~~~~~~~~~~~~~~

    at createTSError (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:859:12)
    at reportTSError (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:863:19)
    at getOutput (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1077:36)
    at Object.compile (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1433:41)
    at Module.m._compile (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Object.require.extensions.<computed> [as .ts] (G:\grocy-micro-ui\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.exports.requireOrImport (G:\grocy-micro-ui\node_modules\mocha\lib\nodejs\esm-utils.js:53:16)
    at async Object.exports.loadFilesAsync (G:\grocy-micro-ui\node_modules\mocha\lib\nodejs\esm-utils.js:100:20)
    at async singleRun (G:\grocy-micro-ui\node_modules\mocha\lib\cli\run-helpers.js:125:3)
    at async Object.exports.handler (G:\grocy-micro-ui\node_modules\mocha\lib\cli\run.js:370:5)

G:\grocy-micro-ui>npm install --save-dev @feathersjs/rest-client

added 4 packages, and audited 316 packages in 2s

55 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm test

> grocy-micro-ui@0.0.0 test
> npm run mocha

> grocy-micro-ui@0.0.0 mocha
> cross-env NODE_ENV=test mocha test/ --require ts-node/register --recursive --extension .ts --exit

warn: Publishing all events to all authenticated users. See `channels.ts` and https://dove.feathersjs.com/api/channels.html for more information.

  Feathers application tests
    ✔ starts and shows the index page
    ✔ shows a 404 JSON error

  client tests
    ✔ initialized the client

  3 passing (77ms)

G:\grocy-micro-ui>

bonus additional steps required to make npm run dev work:

G:\grocy-micro-ui>npm run dev

> grocy-micro-ui@0.0.0 dev
> nodemon -x ts-node src/index.ts

'nodemon' is not recognized as an internal or external command,
operable program or batch file.

G:\grocy-micro-ui>npm install --save-dev nodemon

added 10 packages, and audited 326 packages in 2s

56 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

G:\grocy-micro-ui>npm run dev

> grocy-micro-ui@0.0.0 dev
> nodemon -x ts-node src/index.ts

[nodemon] 3.0.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts,json
[nodemon] starting `ts-node src/index.ts`
warn: Publishing all events to all authenticated users. See `channels.ts` and https://dove.feathersjs.com/api/channels.html for more information.
info: Feathers app listening on http://localhost:3030