Bundling fails on 2.21.0
See original GitHub issueBug description
After upgrading to 2.21.0
and running ESBuild to bundle, a new error occurs:
> ../../common/temp/node_modules/.pnpm/@prisma+client@2.21.0_prisma@2.21.0/node_modules/@prisma/client/runtime/index.js:24152:23:
error: Could not resolve "_http_common" (mark it as external to exclude it from the bundle)
24152 │ var common = require("_http_common");
and
"var runtimeRequire =
typeof __webpack_require__ === 'function' ?
__non_webpack_require__ : require // eslint-disable-line"
How to reproduce
- Install Prisma and ESBuild using PNPM.
- Run
prisma generate
- Run
esbuild app.js --bundle --platform=node --target=node14
- See error
Expected behavior
Prior to 2.21.0
bundling was successful.
Prisma information
// Datasources
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
// Generators
generator client {
provider = "prisma-client-js"
binaryTargets = ["debian-openssl-1.1.x", "linux-musl", "windows", "darwin"]
}
ESBuild config
module.exports = {
bundle: true,
minify: false,
format: "cjs",
keepNames: true,
sourcemap: true,
platform: "node",
logLevel: "error",
target: ["node14"],
external: ["fsevents"],
outfile: "dist/run.js",
entryPoints: ["src/index.ts"],
metafile: false,
loader: { ".prisma": "file" },
}
Environment & setup
- OS: Windows
- Database: Postgres
- Node.js version: v14.16.0
- Prisma version: v2.21.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:19
- Comments:24 (11 by maintainers)
Top Results From Across the Web
React Mixed content error while loading bundle.js (Http/ Https)
remote: remote: remote: ERROR in bundle. js from UglifyJs remote: Unexpected token: name (urlParts) [(webpack)-dev-server/client?
Read more >Apache camel 2.21.0 Release
Fixed an issue with Routing Slip and Dynamic Router when using context scoped error handler, could cause the error handler to become stopped....
Read more >Error Report | Eclipse Plugins, Bundles and Products
Error Code: ... org.eclipse.emf.feature.group [2.21.0,3.0.0)' but it could not be found Cannot satisfy dependency: From: IBM ODM for Developers - Rule ...
Read more >import dependencies on liferay 7.3.2-ga3 - Forums
2)error: package com.liferay.portal.security.pwd does not exist ... i try to deploy this in liferay 7.3.2-ga3 i have the error:Error while starting bundle: ...
Read more >Releases - Docs - OpenVidu
OpenVidu Enterprise, On Premises, 2.21.0, Deploy ... openvidu-webcomponent, ZIP, 2.21.0, GitHub ... openvidu-browser : bundled size cut almost in half!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With webpack 5, simply adding
'_http_common'
to an array in theexternals
build option wasn’t enough for me, I had to specify it this way:In your
webpack.config.js
, addexternals: ['_http_common', 'encoding'],