表題の通り。 DB に入っている文字列から末尾に / のあるパスを作りたかったが、最終的に path.resolve を通すと末尾の / が削除される import path from 'path'; path.resolve('/', '/foo/bar/'); // -> /foo/bar The resulting path is normalized and trailing slashes are removed unless the path is resolved to the root directory. cf. Path | Node.js v22.0.0 Document…