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
Hi, I'm following the template instructions step-by-step. Pardon my basic questions; I am not familiar with esbuild.
I have:
cloned the respository
modified package.json
run npm install
run npm run build
at which point, the build fails with these errors:
[Build] BUILD_DIR=builds, VERSION=0.0.0, BUILD_TIME=2022-08-31 10:26:14
✘ [ERROR] Could not resolve "zotero-types"
src/index.ts:1:23:
1 │ import { Zotero } from "zotero-types";
╵ ~~~~~~~~~~~~~~
You can mark the path "zotero-types" as external to exclude it from the bundle, which will remove
this error.
✘ [ERROR] Could not resolve "zotero-types"
src/views.ts:1:28:
1 │ import { XUL, Zotero } from "zotero-types";
╵ ~~~~~~~~~~~~~~
You can mark the path "zotero-types" as external to exclude it from the bundle, which will remove
this error.
✘ [ERROR] Could not resolve "zotero-types"
src/events.ts:1:23:
1 │ import { Zotero } from "zotero-types";
╵ ~~~~~~~~~~~~~~
You can mark the path "zotero-types" as external to exclude it from the bundle, which will remove
this error.
Additional information:
zotero-types exists in node_modules, among 348 total folders in node_modules following npm install. zotero-types contains README.md, package.json, and index.d.ts
following the error message, I modify build.js this way:
awaitesbuild.build({entryPoints: ["src/index.ts"],external: ["zotero-types"],// <--- add this linebundle: true,// Entry should be the same as add ...outfile: path.join(buildDir, "addo ...
// minify: true,
})
.catch(() => process.exit(1));
and it appears to build ok. Is this the correct fix?
Sorry, this is a bug caused by the upper-stream dependency zotero-types and I have just fixed it.
Making it external might not be the right way. Please pull the latest changes of this repo and update the npm package zotero-types. Make sure it is >= v0.0.3.
Just to remind, the bootstrap mode is now available. The overlay mode will no longer be supported in Zotero 7(though may be years later). If you just started, please consider switching to bootstrap mode.
Hi, I'm following the template instructions step-by-step. Pardon my basic questions; I am not familiar with
esbuild
.I have:
npm install
npm run build
at which point, the build fails with these errors:
Additional information:
zotero-types
exists innode_modules
, among 348 total folders innode_modules
followingnpm install
.zotero-types
contains README.md, package.json, and index.d.tsbuild.js
this way:and it appears to build ok. Is this the correct fix?
system information
thank you for your work
The text was updated successfully, but these errors were encountered: