Notalib / nativescript-webview-ext

Nativescript plugin with extended WebView functionality
Apache License 2.0
76 stars 37 forks source link

Runtime crashes due to transitive dependency object-inspect > util #144

Open grigala opened 1 year ago

grigala commented 1 year ago

Tried to tinker with Webpack settings and also tried to install util dependency but unfortunately nothing helped.

ns --version
8.5.3
✔ Up to date.
 ERROR Error: Uncaught (in promise): Error: Cannot find module 'util'
  Error: Cannot find module 'util'
  at webpackMissingModule (file: src/webpack:.../node_modules/object-inspect/util.inspect.js:1:0)
  at Object../node_modules/object-inspect/util.inspect.js (file: src/webpack:.../node_modules/object-inspect/util.inspect.js:1:0)
  at __webpack_require__ (file: src/webpack:.../webpack/bootstrap:24:0)
  at fn (file: src/webpack:.../webpack/runtime/hot module replacement:62:0)
  at Object../node_modules/object-inspect/index.js (file: src/webpack:.../node_modules/object-inspect/index.js:68:18)
  at __webpack_require__ (file: src/webpack:.../webpack/bootstrap:24:0)
  at fn (file: src/webpack:.../webpack/runtime/hot module replacement:62:0)
  at Object../node_modules/side-channel/index.js (file: src/webpack:.../node_modules/side-channel/index.js:5:14)
  at __webpack_require__ (file: src/webpack:.../webpack/bootstrap:24:0)
  at fn (file: src/webpack:.../webpack/runtime/hot module replacement:62:0)
darklight365 commented 1 year ago

@grigala - you could temporarily patch this by adding the following to your package.json's dependencies: "qs": "npm:querystring@^0.2.0",

History behind why this would be needed: The url library (https://www.npmjs.com/package/url) used internally within this repo had updated the library being used for querystring implementation, see that change here: https://github.com/defunctzombie/node-url/commit/ab4a301ae83a9818d2385911da5fa24c887a0a91

This will be a bandaid solution since this repository is no longer actively maintained, see conversation here: https://github.com/Notalib/nativescript-webview-ext/issues/142#issuecomment-1662412881