retorquere / generator-zotero-plugin

Generate zotero plugin build scaffolding
MIT License
30 stars 7 forks source link

Build error for newly generated plugin #36

Closed FlyingPumba closed 1 year ago

FlyingPumba commented 1 year ago

Hi,

I'm facing the following build error when running npm run build on a newly created project.

> dblp-bibtex-zotero@0.0.1 prebuild /home/ivan/src/dblp-bibtex-zotero
> npm run lint

> dblp-bibtex-zotero@0.0.1 lint /home/ivan/src/dblp-bibtex-zotero
> eslint . --ext .ts --cache --cache-location .eslintcache/

> dblp-bibtex-zotero@0.0.1 build /home/ivan/src/dblp-bibtex-zotero
> tsc --noEmit && node esbuild.js

copying assets
  client/chrome/locale/en-US/dblp-bibtex-zotero.properties
  client/chrome.manifest
  client/install.rdf
  client/locale/en-US/dblp-bibtex-zotero.ftl
  client/manifest.json
  client/prefs.js
  client/style.css
writing version
generating install.rdf
generating update.rdf
generating updates.json
/home/ivan/src/dblp-bibtex-zotero/node_modules/zotero-plugin/rdf.js:80
    icons.push({ 48: i[48].replace(/[.](svg|png)$/, ext => ({ '.svg': '.png', '.png': '.svg' }[ext])) });
                           ^

TypeError: Cannot read property 'replace' of undefined
    at Object.<anonymous> (/home/ivan/src/dblp-bibtex-zotero/node_modules/zotero-plugin/rdf.js:80:28)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/home/ivan/src/dblp-bibtex-zotero/esbuild.js:8:1)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dblp-bibtex-zotero@0.0.1 build: `tsc --noEmit && node esbuild.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the dblp-bibtex-zotero@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ivan/.npm/_logs/2023-07-06T15_00_59_668Z-debug.log

npm version: 6.14.15 Node.js version: v8.10.0

Is something wrong with my setup?

retorquere commented 1 year ago

There was a bug in another plugin; if you run npm install zotero-plugin you will upgrade that plugin and the problem goes away. zotero-plugin failed if you didn't have an iconURL in the package.json.

FlyingPumba commented 1 year ago

@retorquere thanks, it is working now!!