xDimGG / node-steamapi

An object-oriented Steam API wrapper for Node.js developers.
https://www.npmjs.com/package/steamapi
182 stars 42 forks source link

Module not found: Can't resolve './Utils.js' #54

Closed twbrianho closed 4 months ago

twbrianho commented 4 months ago

Hello! First of all, thank you for the wonderful library 🙇 It's working great!

I'm facing a weird issue when I try to deploy my Next.js project on Vercel. The build process fails with the following logs:

Failed to compile.

./node_modules/steamapi/dist/src/SteamAPI.js
Module not found: Can't resolve './Utils.js'

This doesn't happen when I build locally, only on Vercel, which seems to be because Vercel deployments use a case-sensitive file system.

What's weird is your Utils.ts file is named and imported correctly, it's only on build that it gets changed to utils.js in dist/ on both my Mac and on Vercel. I also noticed you already have "forceConsistentCasingInFileNames": true, in tsconfig.json, so I'm confused what's causing the casing inconsistency.

Do you have any guesses what might be wrong? Thank you in advance!

ianlucas commented 4 months ago

Also had someone facing this issue (ianlucas/cs2-inventory-simulator#89).

xDimGG commented 4 months ago

Sorry, guys. Just published a version with the correct casing. I've only recently tested this package on Windows, so it was just working fine lol. I'm guessing Utils.ts becomes utils.js during compilation since it doesn't export a class. Anyway, should be fixed now.

ianlucas commented 4 months ago

Just be aware that the repo didn't update the filename, you need to rename it using git mv or by changing its name, staging, changing its name again to the correct one, then staging again and committing it.

xDimGG commented 4 months ago

Thank you for the reminder, Lucas. I've now fixed that. Windows is annoying to work with...