homer0/cjs2esm

TypeError: Cannot read properties of undefined (reading 'to')

Closed this issue ยท 4 comments

Running npx cjs2esm in root file with no config shows:

[cjs2esm] Loading configuration...
[cjs2esm] No configuration was found, using defaults...
[cjs2esm] Output directory successfully cleaned
[cjs2esm] TypeError: Cannot read properties of undefined (reading 'to')
[cjs2esm] at transformOutput (/home/o/.npm/_npx/b6a0d7ead30377a5/node_modules/cjs2esm/src/index.js:338:25)
[cjs2esm] at /home/o/.npm/_npx/b6a0d7ead30377a5/node_modules/cjs2esm/src/bin.js:25:9
[cjs2esm]
[cjs2esm] If the issue persist, create a ticket and I may be able to help you: https://github.com/homer0/cjs2esm/issues/new :D

node -v v18.16.1

@alextrastero I'm so sorry, I'm just seeing this right now. I'll take a look in the next couple of days.

@alextrastero Again, sorry for the delay.

Now, could it be that you had an empty src directory? I tried without an src and with a file in a sub path, but the only case in which I was able to reproduce your scenario was by removing everything from src but keeping the directory.

Either way, I need to update the deps on the project, so I'll add a better validation.

๐ŸŽ‰ This issue has been resolved in version 4.0.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€