Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

node10: process.binding(...).internalModuleReadFile is not a function #467

Closed
SMotaal opened this issue Jul 15, 2018 · 5 comments
Closed

Comments

@SMotaal
Copy link

SMotaal commented Jul 15, 2018

Just a head up that in newer node versions process.binding(...).internalModuleReadFile is removed in favour of a JSON-specific variant - not sure what it will end up being.

Although in some versions this seems to be a simple rename, it is only reasonable to assume change implementation will follow, and my best guess is that it eventually will be the goto method that allows fast sync read of "package.json".

  require('./test')  // test has index.js and no package.json
pkg/prelude/bootstrap.js:1176
      throw error;
      ^

TypeError: process.binding(...).internalModuleReadFile is not a function
    at Object.fs.internalModuleReadFile.fs.internalModuleReadJSON (pkg/prelude/bootstrap.js:1127:36)
    at internalModuleReadJSON (internal/modules/cjs/loader.js:31:68)
    at readPackage (internal/modules/cjs/loader.js:156:16)
    at tryPackage (internal/modules/cjs/loader.js:172:13)
    at Function.Module._findPath (internal/modules/cjs/loader.js:282:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:589:25)
    at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1270:44)
    at Function.Module._load (internal/modules/cjs/loader.js:518:25)
    at Module.require (internal/modules/cjs/loader.js:648:17)
    at Module.require (pkg/prelude/bootstrap.js:1157:31)
@theogravity
Copy link

theogravity commented Jul 22, 2018

Encountered this issue too. Might have been premature for me to use node 10 for now.

Also noticed that pkg only does 10.4.1 instead of the latest 10.7.0 when using node10 as the target.

@bergheim
Copy link

This fixes the issue for me (no problems since I added the pull request): #461

@makepanic
Copy link

Any chance on getting any of the open PRs for this issue merged?

We're also seeing this issue on node 10.9.0.

tylers-username pushed a commit to improper/lando-alfred-workflow that referenced this issue Sep 13, 2018
@mvila
Copy link

mvila commented Sep 18, 2018

Any progress about this issue? I'd love to be able to upgrade my packaged tools to Node v10.

@simonkberg
Copy link

simonkberg commented Oct 14, 2018

Heads up: Node 10 is scheduled to be promoted to LTS at the end of this month. Is this project still being maintained?

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

No branches or pull requests

6 participants