Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.4.3 giving error : Unable to get property 'configurable' of undefined or null reference #25

Closed
snehasis opened this issue Apr 19, 2022 · 5 comments

Comments

@snehasis
Copy link

Suddenly all our CI builds are failing from April 14. Comparing the node modules versions we found that this Package is updated to a new version and the faulty code is pointing to this NPM package.

Below is the Error we are getting while running our project. It's working fine on version 1.4.2 but not on 1.4.3

Error caught from window.onerror: Message: Unable to get property 'configurable' of undefined or null reference - URL: ms-appx

This Package is a dependency NPM package of npm module @ionic/cloud-angular@0.12.0 , so we are looking for a permanent fix for this.

Please help here on this fix ASAP.

@ljharb
Copy link
Member

ljharb commented Apr 19, 2022

Thanks - can you provide a bit more information? The only change in v1.4.3 is https://github.com/es-shims/RegExp.prototype.flags/blob/main/implementation.js#L37-L39.

module.exports should never be nullish in a working node module bundler. I don't use angular, or ionic, but is there a chance that Ionic Cloud isn't providing a compliant node module environment?

@snehasis
Copy link
Author

snehasis commented Apr 19, 2022

Please find the exact error I am getting on browser.

Error caught from window.onerror: Message: Unable to get property 'configurable' of undefined or null reference - URL: ms-appx-web://com.xxx.xxx/www/build/3.js?v=20.130.97 - Line: 1 - Column: 277884 - Error object: "TypeError: Unable to get property 'configurable' of undefined or null reference\n at r.functionsHaveConfigurableNames (ms-appx-web://com.xxx.xxx/www/build/3.js?v=20.130.97:1:277884)\n at Anonymous function (ms-appx-web://com.xxx.xxx/www/build/1.js?v=20.130.97:1:903235)\n at __webpack_require__ (ms-appx-web://com.xxx.xxx/www/build/manifest.js?v=20.130.97:1:107)\n at Anonymous function (ms-appx-web://com.xxx.xxx/www/build/1.js?v=20.130.97:1:1202311)\n at __webpack_require__ (ms-appx-web://com.xxx.xxx/www/build/manifest.js?v=20.130.97:1:107)\n at 1882 (ms-appx-web://com.xxx.xxx/www/build/3.js?v=20.130.97:1:275481)\n at __webpack_require__ (ms-appx-web://com.xxx.xxx/www/build/manifest.js?v=20.130.97:1:107)\n at 1830 (ms-appx-web://com.xxx.xxx/www/build/2.js?v=20.130.97:1:607481)\n at __webpack_require__ (ms-appx-web://com.xxx.xxx/www/build/manifest.js?v=20.130.97:1:107)\n at 1392 (ms-appx-web://com.xxx.xxx/www/build/2.js?v=20.130.97:1:219820)\n at __webpack_require__ (ms-appx-web://com.xxx.xxx/www/build/manifest.js?v=20.130.97:1:107)\n at 742 (ms-appx-web://com.xxx.xxx/www/build/2.js?v=20.130.97:1:2077062)\n at __webpack_require__ (ms-appx-web://com.xxx.xxx/www/build/manifest.js?v=20.130.97:1:107)\n at 1825 (ms-appx-web://com.xxx.xxx/www/build/2.js?v=20.130.97:1:361436)\n at __webpack_require__ (ms-appx-web://com.xxx.xxx/www/build/manifest.js?v=20.130.97:1:107)"

Internally @ionic/cloud-angular uses some dependency which have this module dependency. Please check below the dependancy tree.
+-- @ionic/cloud-angular@0.12.0
| -- @ionic/cloud@0.16.0 | +-- @ionic/db@0.1.0 | | +-- deep-equal@1.1.1 | | | +-- is-arguments@1.1.1 | | | | -- has-tostringtag@1.0.0
| | | +-- is-date-object@1.0.5
| | | +-- is-regex@1.1.4
| | | +-- object-is@1.1.5
| | | | -- define-properties@1.1.4 | | | | -- has-property-descriptors@1.0.0
| | | +-- object-keys@1.1.1
| | | -- regexp.prototype.flags@1.4.3 | | | -- functions-have-names@1.2.2
| | +-- es6-promise@3.3.1
| | +-- snake-case@2.1.0
| | | -- no-case@2.3.2 | | | -- lower-case@1.1.4
| | -- ws@1.1.5 | -- superagent@1.7.2
| +-- component-emitter@1.2.1
| +-- cookiejar@2.0.6
| +-- form-data@0.2.0
| | +-- combined-stream@0.0.7
| | | -- delayed-stream@0.0.5 | | -- mime-types@2.0.14
| | -- mime-db@1.12.0 | +-- formidable@1.0.17 | +-- mime@1.3.4 | +-- readable-stream@1.0.27-1 | -- reduce-component@1.0.1

FYI : We are using Node version 6.9.x , I know its little older.

For now as a workaround we forcefully installing regexp.prototype.flags@1.4.2, which solves the issue.

@klaygomes
Copy link

This problem is because of the functions-have-names dependency, it assumes getOwnPropertyDescriptor will always return a value that is not true. I opened an issue there. inspect-js/functions-have-names#11

@snehasis
Copy link
Author

Thanks @klaygomes . Hope there will be a permanent fix for this on functions-have-names. For now the workaround works for me.

@ljharb
Copy link
Member

ljharb commented Apr 19, 2022

@klaygomes thanks; I’ll take a look there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants