getstation / electron-chrome-extension

Implementation of Chrome extension APIs for Electron
138 stars 26 forks source link

Bug: Error: Cannot find module 'tslib' #63

Closed rangerscience closed 3 years ago

rangerscience commented 4 years ago

Replicated here, just yarn install and yarn start

Node version v13.0.1, MacOS 10.14.5

This is a barebones Electron app that does zilch else; only yarn install electron-chrome-extension. Adding this module breaks yarn start with the following error on console:

$ yarn start                                                                                                                                                                           
yarn run v1.17.3
warning package.json: No license field
$ electron .
App threw an error during load
Error: Cannot find module 'tslib'
Require stack:
- ./electron-hello-world/node_modules/electron-chrome-extension/lib/browser/index.js
- ./electron-hello-world/node_modules/electron-chrome-extension/index.js
- ./electron-hello-world/main.js
- ./electron-hello-world/node_modules/electron/dist/Electron.app/Contents/Resources/default_app.asar/main.js
-
at Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/browser_init.js:7615:16)
at Module._load (internal/modules/cjs/loader.js:622:27)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at Module.require (internal/modules/cjs/loader.js:775:19)
at require (internal/modules/cjs/helpers.js:68:18)
at Object.<anonymous> (/Users/nickbarone/ecosystems/comake/electron-hello-world/node_modules/electron-chrome-extension/lib/browser/index.js:3:17)
at Module._compile (internal/modules/cjs/loader.js:880:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
rangerscience commented 4 years ago

yarn install tslib appears to fix this (there's a subsequent error), although it should be added to the library dependencies.

rangerscience commented 3 years ago

I'm no longer working on the project that this came up in.