You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Mongoose version
6.6.6
Node.js version
18.7.0
MongoDB server version
Typescript version (if applicable)
Description
npm run build-browser fails on the current master. Even then it reports Browser build successful.. Despite that the published package contains dist/browser.umd.js, which is equal to the one built (successfully) from 5.x branch.
Steps to Reproduce
Failing build:
$ git switch master
$ git clean -f -x .
$ npm i
$ npm run build-browser
> mongoose@6.6.6 build-browser
> node ./scripts/build-browser.js
Starting browser build...
assets by status 1.47 KiB [cached] 1 asset
./browser.js 39 bytes [built] [code generated] [1 error]
ERROR in ./browser.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@babel/preset-env' imported from /home/maciek/repos/oss/mongoose/babel-virtual-resolve-base.js
at new NodeError (/home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:2795:5)
at packageResolve (/home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:3451:9)
at moduleResolve (/home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:3485:18)
at defaultResolve (/home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:3524:13)
at /home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:3547:14
at Generator.next (<anonymous>)
at asyncGeneratorStep (/home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:63:103)
at _next (/home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:65:194)
at /home/maciek/repos/oss/mongoose/node_modules/@babel/core/lib/vendor/import-meta-resolve.js:65:364
at new Promise (<anonymous>)
webpack 5.74.0 compiled with 1 error in 211 ms
Browser build successful.
Identical browser.umd.js files:
$ wget -O mongoose-6.6.6-browser.umd.js https://unpkg.com/mongoose@6.6.6/dist/browser.umd.js
$ wget -O mongoose-5.13.15-browser.umd.js https://unpkg.com/mongoose@5.13.15/dist/browser.umd.js
$ diff mongoose-5.13.15-browser.umd.js mongoose-6.6.6-browser.umd.js
<empty output means no diff>
Also verified on the local build on 5.x branch.
Expected Behavior
dist/browser.umd.js on branch 6.6.6 builds and contains relevant content.
The text was updated successfully, but these errors were encountered:
Prerequisites
Mongoose version
6.6.6
Node.js version
18.7.0
MongoDB server version
Typescript version (if applicable)
Description
npm run build-browser
fails on the currentmaster
. Even then it reportsBrowser build successful.
. Despite that the published package containsdist/browser.umd.js
, which is equal to the one built (successfully) from5.x
branch.Steps to Reproduce
Failing build:
Identical
browser.umd.js
files:Also verified on the local build on
5.x
branch.Expected Behavior
dist/browser.umd.js
on branch 6.6.6 builds and contains relevant content.The text was updated successfully, but these errors were encountered: