← All tasks
javascriptremix-run/remix #2691Not a task: not reproduced

ESM? Build errors after updating to v1.3.5

envgap__remix-run__remix-2691

Original GitHub issue ↗Opened 2022-04-07

01 / FAILURE SIGNATURE

As reported upstream

✘ [ERROR] [plugin server-bare-modules] Cannot find module 'encoding/package.json'
Not a benchmark task.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

remix-run/remix #2691 · read the original issue
### What version of Remix are you using?



1.3.5 and 1.4.0



### Steps to Reproduce



update from 1.3.4 to 1.3.5 or 1.4.0



run `remix build`



### Expected Behavior



App should compile



### Actual Behavior



Lots of errors starting with the following:



```

Building Remix app in production mode...

y-indexeddb is possibly an ESM only package and should be bundled with "serverDependenciesToBundle in remix.config.js.

The path "encoding" is imported in generated/prisma/client/runtime/index.js but encoding is not listed in your package.json dependencies. Did you forget to install it?

✘ [ERROR] [plugin server-bare-modules] Cannot find module 'encoding/package.json'

Require stack:

- /node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/compiler/plugins/serverBareModulesPlugin.js

- /node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/compiler.js

- /node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/cli/commands.js

- /node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/cli/run.js

- /node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/cli/index.js

- /node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/index.js

- /node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/cli.js

    generated/prisma/client/runtime/index.js:15389:26:

      15389 │         convert = require("encoding").convert;

            ╵                           ~~~~~~~~~~

  This error came from the "onResolve" callback registered here:

    node_modules/.pnpm/@remix-run+dev@1.3.5_25e4b5bc5190ce64f1c1869d744ce914/node_modules/@remix-run/dev/compiler/plugins/serverBareModulesPlugin.js:46:12:

      46 │       build.onResolve({

         ╵             ~~~~~~~~~

```



There are many more errors, but all seem realeted.



Reverting back to v1.3.4 and everything is ok again.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy already_works is install-only; proposed control still requires runtime verification.