FreedomGPT icon indicating copy to clipboard operation
FreedomGPT copied to clipboard

Cannot execute program

Open ichiru5555 opened this issue 2 years ago • 13 comments

forge.config.ts:5:32 - error TS2307: Cannot find module './devconst' or i…

5 import { DEVELOPER_DATA } from "./devconst"; ~~~~~~~~~~~~ ◼ Preparing native dependencies ◼ Running generateAssets hook

An unhandled rejection has occurred inside Forge: TSError: ⨯ Unable to compile TypeScript: forge.config.ts:5:32 - error TS2307: Cannot find module './devconst' or its corresponding type declarations.

5 import { DEVELOPER_DATA } from "./devconst"; ~~~~~~~~~~~~ at createTSError (/local/node/freedom-gpt/node_modules/ts-node/src/index.ts:859:12) at reportTSError (/local/node/freedom-gpt/node_modules/ts-node/src/index.ts:863:19) at getOutput (/local/node/freedom-gpt/node_modules/ts-node/src/index.ts:1077:36) at Object.compile (/local/node/freedom-gpt/node_modules/ts-node/src/index.ts:1433:41) at Module.m._compile (/local/node/freedom-gpt/node_modules/ts-node/src/index.ts:1617:30) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Object.require.extensions. [as .ts] (/local/node/freedom-gpt/node_modules/ts-node/src/index.ts:1621:12) at Module.load (node:internal/modules/cjs/loader:1037:32) at Function.Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1061:19) at require (node:internal/modules/cjs/helpers:103:18) at exports.default (/local/node/freedom-gpt/node_modules/@electron-forge/core/src/util/forge-config.ts:127:22) at async Task.task (/local/node/freedom-gpt/node_modules/@electron-forge/core/src/api/start.ts:63:29) at async Task.run (/local/node/freedom-gpt/node_modules/listr2/dist/index.cjs:978:11) at async /local/node/freedom-gpt/node_modules/p-map/index.js:57:22 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The error message is The program is not executable. My environment is almalinux 8 node.js version v18.12.1 The directory is node_modules src assets build The What am I missing?

ichiru5555 avatar Mar 31 '23 14:03 ichiru5555

just remove the references in the forge.config.ts file the app signing stuff is only needed to create and sign a macos binary

ChrisKretschmer avatar Apr 01 '23 09:04 ChrisKretschmer

thank you. How to start this program yarn start Is it okay? yarn start when you hit

[0401/200520.265877:FATAL:electron_main_delegate.cc(300)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. Done in 16.50s.

There is a sentence. Is it because it's a success? Port 3000 is not used.

ichiru5555 avatar Apr 01 '23 11:04 ichiru5555

Well - I guess, you shouldn't run it as root

ChrisKretschmer avatar Apr 01 '23 11:04 ChrisKretschmer

thank you.

Error launching app Unable to find Electron app at /local/node/freedom-gpt Cannot find module '/local/node/freedom-gpt/.webpack/main'. Please verify that the package.json has a valid "main" entry error Command failed with exit code 1.

I get an error saying. There is no directory /local/node/freedom-gpt/.webpack/main.

ichiru5555 avatar Apr 01 '23 11:04 ichiru5555

yarn run v1.22.19 $ APP_DEV=true electron-forge start 'APP_DEV' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

l-Aeden-l avatar Apr 02 '23 21:04 l-Aeden-l

yarn run v1.22.19 $ APP_DEV=true electron-forge start 'APP_DEV' n’est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Same problem here

cypherfunk-dev avatar Apr 03 '23 15:04 cypherfunk-dev

yarn run v1.22.19 $ APP_DEV=true electron-forge start 'APP_DEV' is not recognized as an internal or external command, operable program or batch file. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

can anyone help?

Tokaroi avatar Apr 04 '23 00:04 Tokaroi

Since the program was updated, I also updated Linux

[2843:0404/204445.068037:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY [2843:0404/204445.069333:ERROR:env.cc(255)] The platform failed to initialize. Exiting.

However, it does not start with an error. in the dependency related installation warning " > [email protected]" has unmet peer dependency "webpack@>=5". warning " > [email protected]" has unmet peer dependency "webpack@^5.1.0". warning " > [email protected]" has unmet peer dependency "webpack@^5.0.0". warning " > [email protected]" has unmet peer dependency "webpack@^5.11.0". warning " > [email protected]" has unmet peer dependency "webpack@^5.0.0". warning " > [email protected]" has unmet peer dependency "webpack@^5.0.0". warning " > [email protected]" has unmet peer dependency "webpack@^5.0.0". warning " > [email protected]" has unmet peer dependency "@types/node@*".

A log came out.

ichiru5555 avatar Apr 04 '23 11:04 ichiru5555

freedom-gpt doesn't seem to support Linux. Today's update was to add support for Windows. However, I saw an article that it works on windows, but what about it? It's nice to support Windows and Mac, but I'd like to see Linux supported as well.

ichiru5555 avatar Apr 04 '23 12:04 ichiru5555

assets by path native_modules/client-dist/.map 740 KiB asset native_modules/client-dist/socket.io.js.map 231 KiB [emitted] (auxiliary name: main) asset native_modules/client-dist/socket.io.msgpack.min.js.map 181 KiB [emitted] (auxiliary name: main) asset native_modules/client-dist/socket.io.min.js.map 167 KiB [emitted] (auxiliary name: main) asset native_modules/client-dist/socket.io.esm.min.js.map 161 KiB [emitted] (auxiliary name: main) assets by path native_modules/client-dist/.js 252 KiB asset native_modules/client-dist/socket.io.js 122 KiB [emitted] (auxiliary name: main) asset native_modules/client-dist/socket.io.msgpack.min.js 49.6 KiB [emitted] (auxiliary name: main) asset native_modules/client-dist/socket.io.min.js 44.8 KiB [emitted] (auxiliary name: main) asset native_modules/client-dist/socket.io.esm.min.js 36.2 KiB [emitted] (auxiliary name: main) asset index.js 1.57 MiB [emitted] (name: main) 1 related asset runtime modules 898 bytes 5 modules modules by path ./node_modules/ 1.35 MiB javascript modules 1.09 MiB 195 modules json modules 264 KiB modules by path ./node_modules/iconv-lite/ 86.7 KiB ./node_modules/iconv-lite/encodings/tables/shiftjis.json 8.78 KiB [built] [code generated] ./node_modules/iconv-lite/encodings/tables/eucjp.json 15.1 KiB [built] [code generated] ./node_modules/iconv-lite/encodings/tables/cp936.json 20.1 KiB [built] [code generated] + 5 modules ./node_modules/socket.io/package.json 1.79 KiB [built] [code generated] ./node_modules/update-electron-app/package.json 889 bytes [built] [code generated] ./node_modules/mime-db/db.json 143 KiB [built] [code generated] ./node_modules/statuses/codes.json 1.51 KiB [built] [code generated] ./node_modules/mime/types.json 30.8 KiB [built] [code generated]

  • 23 modules

WARNING in ./node_modules/ws/lib/buffer-util.js 113:23-44 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\fpsbrandalm81\freedom-gpt-electron-app\node_modules\ws\lib' @ ./node_modules/ws/lib/websocket.js 31:21-45 @ ./node_modules/ws/index.js 3:18-44 @ ./node_modules/engine.io/build/server.js 12:13-26 @ ./node_modules/engine.io/build/engine.io.js 5:17-36 @ ./node_modules/socket.io/dist/index.js 36:20-40 @ ./src/index.ts 22:20-40

WARNING in ./node_modules/ws/lib/validation.js 117:24-49 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\fpsbrandalm81\freedom-gpt-electron-app\node_modules\ws\lib' @ ./node_modules/ws/lib/sender.js 11:30-53 @ ./node_modules/ws/index.js 8:19-42 @ ./node_modules/engine.io/build/server.js 12:13-26 @ ./node_modules/engine.io/build/engine.io.js 5:17-36 @ ./node_modules/socket.io/dist/index.js 36:20-40 @ ./src/index.ts 22:20-40

WARNING in ./node_modules/socket.io/dist/index.js Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. Invalid dependencies may lead to broken watching and caching. As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). Globs: They are not supported. Pass absolute path to the directory as context dependencies. The following invalid values have been reported:

  • "C:/Users/fpsbrandalm81/freedom-gpt-electron-app/node_modules/socket.io/client-dist/socket.io.esm.min.js"
  • "C:/Users/fpsbrandalm81/freedom-gpt-electron-app/node_modules/socket.io/client-dist/socket.io.esm.min.js.map"
  • "C:/Users/fpsbrandalm81/freedom-gpt-electron-app/node_modules/socket.io/client-dist/socket.io.js"
  • and more ... @ ./src/index.ts 22:20-40

3 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.77.0 compiled with 3 warnings in 3247 ms assets by status 992 KiB [cached] 8 assets asset index.js 1.57 MiB [emitted] (name: main) 1 related asset cached modules 1.36 MiB [cached] 231 modules runtime modules 793 bytes 4 modules

WARNING in ./node_modules/ws/lib/buffer-util.js 113:23-44 Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\fpsbrandalm81\freedom-gpt-electron-app\node_modules\ws\lib' @ ./node_modules/ws/lib/websocket.js 31:21-45 @ ./node_modules/ws/index.js 3:18-44 @ ./node_modules/socket.io-adapter/dist/index.js 7:18-31 @ ./node_modules/socket.io/dist/index.js 42:28-56 @ ./src/index.ts 22:20-40

WARNING in ./node_modules/ws/lib/validation.js 117:24-49 Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\fpsbrandalm81\freedom-gpt-electron-app\node_modules\ws\lib' @ ./node_modules/ws/lib/receiver.js 13:43-66 @ ./node_modules/ws/index.js 7:21-46 @ ./node_modules/socket.io-adapter/dist/index.js 7:18-31 @ ./node_modules/socket.io/dist/index.js 42:28-56 @ ./src/index.ts 22:20-40

WARNING in ./node_modules/socket.io/dist/index.js Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths. Invalid dependencies may lead to broken watching and caching. As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior. Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories). Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories). Globs: They are not supported. Pass absolute path to the directory as context dependencies. The following invalid values have been reported:

  • "C:/Users/fpsbrandalm81/freedom-gpt-electron-app/node_modules/socket.io/client-dist/socket.io.esm.min.js"
  • "C:/Users/fpsbrandalm81/freedom-gpt-electron-app/node_modules/socket.io/client-dist/socket.io.esm.min.js.map"
  • "C:/Users/fpsbrandalm81/freedom-gpt-electron-app/node_modules/socket.io/client-dist/socket.io.js"
  • and more ... @ ./src/index.ts 22:20-40

3 warnings have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.77.0 compiled with 3 warnings in 741 ms

Can anyone help?

Tokaroi avatar Apr 04 '23 16:04 Tokaroi

I do not know if it will be resolved. Module not found: Error: Can't resolve 'bufferutil' in 'C:\Users\fpsbrandalm81\freedom-gpt-electron-app\node_modules\ws\lib' Module not found: Error: Can't resolve 'utf-8-validate' in 'C:\Users\fpsbrandalm81\freedom-gpt-electron-app\node_modules\ws\lib' I believe this error is due to a missing module. Installation method. bufferutil: https://www.npmjs.com/package/bufferutil utf-8-validate: https://www.npmjs.com/package/utf-8-validate

ichiru5555 avatar Apr 04 '23 22:04 ichiru5555

ISSUE

All fine and well until trying to run the application:

C:\Users\User\freedom-gpt-electron-app>yarn start
yarn run v1.22.19
$ electron-forge start
"electron-forge" is not recognized as an internal or external command,
program or executable batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

SOLUTION

I fixed it with the following steps: Steps I followed using Git Bash (Windows), which you get if you install Git on Windows:

npm install -g electron-forge
yarn add --dev electron-prebuilt-compile
rm -rf node_modules/electron
yarn install
npm install electron
yarn start

jochotecoa avatar Apr 06 '23 09:04 jochotecoa

I started it on Windows. Type it: 'Hi'. Still no response.

ivanbodurov avatar Apr 12 '23 01:04 ivanbodurov