You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
TypeError: require(...).internalModuleStat is not a function
at internalModuleStat (internal/modules/cjs/loader.js:59:64)
at stat (internal/modules/cjs/loader.js:143:18)
at Function.Module._findPath (internal/modules/cjs/loader.js:630:20)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:951:27)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Module.require (internal/modules/cjs/loader.js:1024:19)
at Module._preloadModules (internal/modules/cjs/loader.js:1276:12)
at loadPreloadModules (internal/bootstrap/pre_execution.js:444:5)
at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:76:3)
at internal/bootstrap/pkg.js:7:1
> Warning Failed to make bytecode node12-x64 for file /snapshot/srv/node_modules/accepts/index.js
Reacted by Marika Marszalkowski, SnakeDrak, Christoph Knittel, Dean Kamali and pashist
Hey @acidos, I'm getting the same error when running hasura metadata export in Hasura CLI.
This is the only place I could find. Have you found a root cause of the problem? Something wrong with Node installation?
I had the same issue and it was only happening when I ran it from the terminal in VSCode. In a separate terminal it worked. (Changing the shell in VSCode didn't help either).
Reacted by Blast Z, SnakeDrak, Remi Ferland, Nicolo' Brandizzi, Jason H, François Levasseur and Felix Wehnert
Reacted by Piotr Monwid-Olechnowicz, Remi Ferland, Felix Wehnert and Matt Gibson
It seems NODE_OPTIONS is read by the node inside of the pkg, so if you have any special option or bootstrap included on that environment variable, it could generate conflicts with the node inside the pkg (with the debugger, for example).
In my case, that NODE_OPTIPONS was in my particular environment defined by VSCode because I was debugging on that moment. I don't know the reason because VSCode defined the variable in my session, maybe it is related to some particular configuration of the debug options.
I saw some errors related to that: require(...).internalModuleStat is not a function and ERR_INSPECTOR_NOT_AVAILABLE. However, multiple errors could be generated, it depends of each NODE_OPTIONS.
I don't know if vercel/pkg/@igorklopov want to remove this feature, because it could be useful. However, I will make a PR to include it on the documentation.
Activity
hasparus commentedon Sep 12, 2020
Hey @acidos, I'm getting the same error when running
hasura metadata exportin Hasura CLI.This is the only place I could find. Have you found a root cause of the problem? Something wrong with Node installation?
acidos commentedon Sep 12, 2020
@hasparus no, I gave up...
marikaner commentedon Sep 23, 2020
I had the same issue and it was only happening when I ran it from the terminal in VSCode. In a separate terminal it worked. (Changing the shell in VSCode didn't help either).
SnakeDrak commentedon Nov 3, 2020
It seems NODE_OPTIONS is read by the
nodeinside of thepkg, so if you have any special option or bootstrap included on that environment variable, it could generate conflicts with thenodeinside thepkg(with the debugger, for example).In my case, that NODE_OPTIPONS was in my particular environment defined by VSCode because I was debugging on that moment. I don't know the reason because
VSCodedefined the variable in my session, maybe it is related to some particular configuration of the debug options.I saw some errors related to that:
require(...).internalModuleStat is not a functionandERR_INSPECTOR_NOT_AVAILABLE. However, multiple errors could be generated, it depends of eachNODE_OPTIONS.Another example of this, on this issue in graphql-engine, solved removing the environment variable.
I don't know if vercel/pkg/@igorklopov want to remove this feature, because it could be useful. However, I will make a PR to include it on the documentation.
Added documentation about NODE_OPTIONS (vercel#954)
README: add troubleshooting about NODE_OPTIONS
hipstersmoothie commentedon Mar 25, 2021
closing duplicate of #782
build: disable NODE_OPTIONS
build: disable NODE_OPTIONS
build: disable NODE_OPTIONS