π
π9mo ago

Deno not compiling npm packages

I encounter failure at my Deno project Github Action build site step. So it compiles well (right?) my Deno packages, some npm packages but not totally. I had to download manually with npm run some packages like linkify.js and punycode.js, is that normal?
No description
No description
3 Replies
Deno AI Helper
Deno AI Helper9mo ago
It seems like you're experiencing issues with compiling npm packages in your Deno project. According to the documentation, Deno has been working on improving compatibility with npm packages, and as of Deno 1.34, deno compile does support npm packages. However, there are still some edge cases and specific scenarios where compatibility issues may arise. For instance, some npm modules may not be compatible yet due to certain assumptions they make about the Node.js environment, such as expecting a package.json to exist in the current working directory, or relying on post-install scripts which Deno does not run for security reasons. If you're having to manually download packages like linkify.js and punycode.js, it's possible that these packages or their dependencies fall into one of the categories that are not yet fully supported by Deno's compatibility layer. The documentation encourages users to report any issues they encounter with npm packages in Deno, so the Deno team can address these compatibility gaps. If you haven't already, consider opening an issue on the Deno GitHub repository with details about the problems you're facing. This will help the Deno team to track and potentially resolve the issue in future releases. In the meantime, you might need to continue using workarounds like manually downloading certain packages, or looking for alternative modules that are fully compatible with Deno. 🦕
ry
ry9mo ago
Hmm it’s hard to say more .. can you open an issue with some details?
π
πOP9mo ago
Sure Meanwhile I think a bash script could help automate the compilation. I will work on one

Did you find this page helpful?