Verify latest release
pnpm version
v10.5.2
Which area(s) of pnpm are affected? (leave empty if unsure)
CLI
Link to the code that reproduces this issue or a replay of the bug
https://github.com/FediMod/fires/tree/feat/setup-docker-file
Reproduction steps
- After cloning the branch given above, change line 100 of
Dockerfile to just cp /fires-server-deploy/package.json /fires-server-build/package.json
- run
docker build . --target fires-server --tag fires-server:latest
- run the interactive container:
docker run -it --rm --env-file=components/fires-server/.env.docker fires-server /bin/sh
cat package.json, observe that it's missing the imports key (this exists in the source package.json)
This can also be verified by trying to run in the container node ace list which crashes as it can't find #start/env
(Apologies for the kinda messy steps, this was the only good reproduction steps I could offer, but you could probably verify it with any package that has imports key set in it's package.json)
Describe the Bug
The imports key is important for ESM based apps, allowing for remapping imports from, e.g., #start/env to ./start/env.js
Without this key in the package.json, Adonis.js applications fail to start.
Expected Behavior
The package.json should be verbatim as it exists in the source of the pnpm deploy package to deploy, only with the packageManager, and dependency related keys replaced (this would give most compatibility with existing software)
Which Node.js version are you using?
22.x
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
alpine (Linux 47bc21689fff 6.12.5-linuxkit aarch64 Linux)
Verify latest release
pnpm version
v10.5.2
Which area(s) of pnpm are affected? (leave empty if unsure)
CLI
Link to the code that reproduces this issue or a replay of the bug
https://github.com/FediMod/fires/tree/feat/setup-docker-file
Reproduction steps
Dockerfileto justcp /fires-server-deploy/package.json /fires-server-build/package.jsondocker build . --target fires-server --tag fires-server:latestcat package.json, observe that it's missing theimportskey (this exists in the source package.json)This can also be verified by trying to run in the container
node ace listwhich crashes as it can't find#start/env(Apologies for the kinda messy steps, this was the only good reproduction steps I could offer, but you could probably verify it with any package that has
importskey set in it'spackage.json)Describe the Bug
The
importskey is important for ESM based apps, allowing for remapping imports from, e.g.,#start/envto./start/env.jsWithout this key in the
package.json, Adonis.js applications fail to start.Expected Behavior
The
package.jsonshould be verbatim as it exists in the source of thepnpm deploypackage to deploy, only with thepackageManager, and dependency related keys replaced (this would give most compatibility with existing software)Which Node.js version are you using?
22.x
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
alpine (Linux 47bc21689fff 6.12.5-linuxkit aarch64 Linux)