-
Notifications
You must be signed in to change notification settings - Fork 201
Conversation
|
||
const { SafeMap } = primordials; | ||
-const { internalModuleReadJSON } = internalBinding('fs'); | ||
+const internalModuleReadJSON = function (f) { return require('fs').internalModuleReadJSON(f); }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but it seems like this gives:
pkg/prelude/bootstrap.js:1244
throw error;
^
TypeError: internalModuleReadJSON is not a function or its return value is not iterable
at Object.read (internal/modules/package_json_reader.js:17:34)
at readPackage (internal/modules/cjs/loader.js:249:36)
at readPackageScope (internal/modules/cjs/loader.js:287:19)
at trySelf (internal/modules/cjs/loader.js:396:41)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:942:22)
at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1338:44)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at Module.require (pkg/prelude/bootstrap.js:1225:31)
at require (internal/modules/cjs/helpers.js:72:18)pkg/prelude/bootstrap.js:1244
throw error;
^
TypeError: internalModuleReadJSON is not a function or its return value is not iterable
at Object.read (internal/modules/package_json_reader.js:17:34)
at readPackage (internal/modules/cjs/loader.js:249:36)
at readPackageScope (internal/modules/cjs/loader.js:287:19)
at trySelf (internal/modules/cjs/loader.js:396:41)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:942:22)
at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1338:44)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at Module.require (pkg/prelude/bootstrap.js:1225:31)
at require (internal/modules/cjs/helpers.js:72:18)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rewriting this for node 14.12
internal/modules/package_json_reader.js:21
const [string, containsKeys] = internalModuleReadJSON(
^
TypeError: internalModuleReadJSON is not a function or its return value is not iterable
at Object.read (internal/modules/package_json_reader.js:21:34)
at readPackage (internal/modules/cjs/loader.js:264:36)
at readPackageScope (internal/modules/cjs/loader.js:297:19)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1087:17)
at Module.load (internal/modules/cjs/loader.js:941:32)
at Function.Module._load (internal/modules/cjs/loader.js:782:14)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12)
at internal/main/run_main_module.js:17:47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you come up with a fix?
I've compiled it for armv7 and the resulting app can't start complaining that it can't parse the main package.json that is perfectly valid:
It looks like the only opening brace character is read from the file somehow, so obviously the input's end is unexpected. |
In newer versions of Node.js the |
If anyone wanna pick this up feel free. I am going to fully migrate over to caxa once it supports ARM leafac/caxa#4 |
I am working on a node v12.21.0 patch based on this PR. |
Thank you @xanonid! 🙏 |
I have a fix for the
|
No description provided.