Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Fix building for Cloudflare Nitro preset #1726

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

brawaru
Copy link
Contributor

@brawaru brawaru commented Jun 14, 2024

It seems that Rollup node-resolve module doesn't properly deal with trailing slashes, causing it to think that string_decoder is a built-in Node.js dependency and attempt to import it from unenv, which will obviously fail, because string_decoder is not, in fact, a Node.js dependency, but an individual dependency of readable-stream.

This adds a small patch for readable-stream@2.3.8 dependency, which removes the leading slash, which seems to fix the builds.

This probably should be reported to relevant developers (Rollup node-resolve plugin or Nitro?).

It seems that Rollup node-resolve module doesn't properly deal with
trailing slashes, causing it to thing that `string_decoder` is a
built-in Node.js dependency and attempt to import it from `unenv`, which
will obviously fail, because `string_decoder` is not, in fact, a Node.js
dependency, but an individual dependency of `readable-stream`.

This adds a small patch for `readable-stream@2.3.8` dependency, which
removes the leading slash, which seems to fix the builds.

This probably should be reported to relevant developers (Rollup
node-resolve plugin or Nitro?).
@brawaru brawaru marked this pull request as ready for review June 14, 2024 22:19
@Geometrically Geometrically merged commit e0a9e62 into modrinth:master Jun 14, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants