mikejgray / ovos-skill-projen

Opinionated best-practice skill generator for OVOS/Neon skills. Also has an option to retrofit Mycroft skills using OVOS best practices.
Apache License 2.0
6 stars 1 forks source link

[BUG] `--retrofit` throws lots of `ENOENT` errors #9

Closed strugee closed 1 year ago

strugee commented 1 year ago

Description

A --retrofit run on the classic core Jellyfin skill prints (throws?) ENOENT errors on vocab, dialog, regex, intents. As a user it's unclear to me whether this represents a bug or not - I'd expect a true error to crash the program, yet clearly it still keeps going enough to reinitialize the git repo and commit. However, if the error is handled, I'd expect it to be caught and either generate a warning on stderr, or be silently swallowed.

Steps to Reproduce

Relevant Code

No response

Other Notes

Logs:

$ git clone git@github.com:strugee/jellyfin-skill.git
Cloning into 'jellyfin-skill'...
[irrelevant clone output snipped]

$ cd jellyfin-skill/

$ projen new ovosskill --from "@mikejgray/ovos-skill-projen" --retrofit
/var/home/alex/Development/jellyfin-skill
└── (empty)

added 1 package, and audited 69 packages in 2s

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

found 0 vulnerabilities
👾 installing external module @mikejgray/ovos-skill-projen...

added 1 package, and audited 70 packages in 619ms

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

found 0 vulnerabilities

👾 Project definition file was created at /var/home/alex/Development/jellyfin-skill/.projenrc.json
Error: ENOENT: no such file or directory, scandir 'regex'
    at Object.readdirSync (node:fs:1438:3)
    at /var/home/alex/Development/jellyfin-skill/node_modules/@mikejgray/ovos-skill-projen/lib/index.js:205:43
    at Array.forEach (<anonymous>)
    at OVOSSkillProject.restructureLocaleFolders (/var/home/alex/Development/jellyfin-skill/node_modules/@mikejgray/ovos-skill-projen/lib/index.js:201:49)
    at new OVOSSkillProject (/var/home/alex/Development/jellyfin-skill/node_modules/@mikejgray/ovos-skill-projen/lib/index.js:54:18)
    at evalmachine.<anonymous>:1:27
    at Script.runInContext (node:vm:141:12)
    at Object.runInContext (node:vm:297:6)
    at createProject (/var/home/alex/.local/lib/node_modules/projen/lib/projects.js:97:8)
    at Function.createProject (/var/home/alex/.local/lib/node_modules/projen/lib/projects.js:30:9) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: 'regex'
}
Error: ENOENT: no such file or directory, scandir 'intents'
    at Object.readdirSync (node:fs:1438:3)
    at /var/home/alex/Development/jellyfin-skill/node_modules/@mikejgray/ovos-skill-projen/lib/index.js:205:43
    at Array.forEach (<anonymous>)
    at OVOSSkillProject.restructureLocaleFolders (/var/home/alex/Development/jellyfin-skill/node_modules/@mikejgray/ovos-skill-projen/lib/index.js:201:49)
    at new OVOSSkillProject (/var/home/alex/Development/jellyfin-skill/node_modules/@mikejgray/ovos-skill-projen/lib/index.js:54:18)
    at evalmachine.<anonymous>:1:27
    at Script.runInContext (node:vm:141:12)
    at Object.runInContext (node:vm:297:6)
    at createProject (/var/home/alex/.local/lib/node_modules/projen/lib/projects.js:97:8)
    at Function.createProject (/var/home/alex/.local/lib/node_modules/projen/lib/projects.js:30:9) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: 'intents'
}
Reinitialized existing Git repository in /var/home/alex/Development/jellyfin-skill/.git/
[main 7116ad4] chore: project created with projen
 81 files changed, 517 insertions(+), 5 deletions(-)
[long git commit output snipped]

$ projen --version
0.71.156