This can happen if you use the "--no-optional" flag. The "optionalDependencies"
package.json feature is used by esbuild to install the correct binary executable
for your current platform. This install script will now attempt to work around
this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
node:internal/modules/cjs/loader:940
const err = new Error(message);
^
C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at downloadedBinPath (C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js:79:46)
at checkAndPreparePackage (C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js:223:15)
at Object. (C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js:238:1)
at Module._compile (node:internal/modules/cjs/loader:1116:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js'
]
}
at EventEmitter.i.invoke (node:electron/js2c/renderer_init:57:526)
at async Plugins._handleAddFromNpm (file:///C:/Users/emanu/AppData/Local/insomnia/app-2022.2.0/resources/app.asar/bundle.js:416303:7)
Error: Error invoking remote method 'installPlugin': Error: insomnia-plugin-graphql-codegen install error: Command failed: "C:\Users\emanu\AppData\Local\insomnia\app-2022.2.0\Insomnia.exe" --no-deprecation "C:\Users\emanu\AppData\Local\insomnia\app-2022.2.0\resources\bin\yarn-standalone.js" add insomnia-plugin-graphql-codegen --modules-folder "C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852" --cwd "C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852" --no-lockfile --production --no-progress error C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild: Command failed. Exit code: 1 Command: node install.js Arguments: Directory: C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild Output: [esbuild] Failed to find package "esbuild-windows-64" on the file system
This can happen if you use the "--no-optional" flag. The "optionalDependencies" package.json feature is used by esbuild to install the correct binary executable for your current platform. This install script will now attempt to work around this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
node:internal/modules/cjs/loader:940 const err = new Error(message); ^
Error: Cannot find module 'esbuild' Require stack:
C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15) at Function.resolve (node:internal/modules/cjs/helpers:108:19) at downloadedBinPath (C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js:79:46) at checkAndPreparePackage (C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js:223:15) at Object. (C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js:238:1)
at Module._compile (node:internal/modules/cjs/loader:1116:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\emanu\AppData\Local\Temp\insomnia_2022.2.0\insomnia-plugin-graphql-codegen-1647624979852\esbuild\install.js'
]
}
at EventEmitter.i.invoke (node:electron/js2c/renderer_init:57:526) at async Plugins._handleAddFromNpm (file:///C:/Users/emanu/AppData/Local/insomnia/app-2022.2.0/resources/app.asar/bundle.js:416303:7)