CesiumGS / CesiumGS/obj2gltf

No verification that input file exists (and obscure error message)

Open
#255 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.9k
Forks
311
PR merge metrics
No merged PRs in 30d

Description

Just wanted to leave a not that the library does not check whether the file exists, and throws a difficult to interpret error. Dropping it here for so that is searchable.

```
obj2gltf -i this/file/does/not/exit.obj -o /foo/bar
/usr/local/lib/node_modules/obj2gltf/node_modules/universalify/index.js:15
}, 'name', { value: fn.name })
^

TypeError: Cannot read property 'name' of undefined
at exports.fromCallback (/usr/local/lib/node_modules/obj2gltf/node_modules/universalify/index.js:15:26)
at Object. (/usr/local/lib/node_modules/obj2gltf/node_modules/fs-extra/lib/fs/index.js:57:27)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/obj2gltf/node_modules/fs-extra/lib/index.js:5:6)
make: *** [obj2gltf_test2] Error 1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the documented command with a nonexistent input path: `obj2gltf -i this/file/does/not/exit.obj -o /foo/bar`. Trace the input-path handling from the CLI entry point and make the failure identify the missing file clearly; done means the command no longer exposes the shown obscure stack trace.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.