What kind of mistake and how to fix electron?



  • I have an old project. electronwhich is not done. Thought I'd take it and finish all I didn't do, but when I started it, I get it.

    An unhandled rejection has occurred inside Forge:
    Error: Cannot find module 'C:\Users\olegp\mini_library_2020\client_reader\node_modules\electron-prebuilt-compile\lib\main.js'. Please verify that the package.json has a valid "main" entry
        at tryPackage (node:internal/modules/cjs/loader:353:19)
        at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
        at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
        at Function.Module._load (node:internal/modules/cjs/loader:778:27)
        at Module.require (node:internal/modules/cjs/loader:1005:19)
        at require (node:internal/modules/cjs/helpers:102:18)
        at forgeSpawn (C:\Users\olegp\mini_library_2020\client_reader\node_modules\@electron-forge\core\src\api\start.ts:81:26)
        at forgeSpawnWrapper (C:\Users\olegp\mini_library_2020\client_reader\node_modules\@electron-forge\core\src\api\start.ts:121:21)
        at C:\Users\olegp\mini_library_2020\client_reader\node_modules\@electron-forge\cli\src\electron-forge-start.ts:58:19 {
      code: 'MODULE_NOT_FOUND',
      path: 'C:\\Users\\olegp\\mini_library_2020\\client_reader\\node_modules\\electron-prebuilt-compile\\package.json',
      requestPath: 'C:\\Users\\olegp\\mini_library_2020\\client_reader\\node_modules\\electron-prebuilt-compile'
    }
    

    Electron Forge was terminated. Location:
    {}

    How can you fix that?

    Supplement

    I see there's nothing. main.js In that file. But how am I supposed to set it up and do it at all?

    введите сюда описание изображения

    Box versions:

      "devDependencies": {
    "@electron-forge/cli": "^6.0.0-beta.54",
    "@electron-forge/maker-deb": "^6.0.0-beta.54",
    "@electron-forge/maker-rpm": "^6.0.0-beta.54",
    "@electron-forge/maker-squirrel": "^6.0.0-beta.54",
    "@electron-forge/maker-zip": "^6.0.0-beta.54",
    "electron": "^1.3.2",
    "electron-prebuilt-compile": "^1.3.2"

    That's what's interesting.

    npm WARN deprecated babel-preset-es2015@6.24.1:   Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
    npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
    npm WARN deprecated har-validator@5.1.5: this library is no longer supported
    npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
    npm WARN deprecated constantinople@3.0.2: Please update to at least constantinople 3.1.1
    npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
    npm WARN deprecated electron-prebuilt@1.3.2: electron-prebuilt has been renamed to electron. For more details, see http://electron.atom.io/blog/2016/08/16/npm-install-electron
    npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
    npm WARN deprecated node-pre-gyp@0.11.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
    npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
    npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
    npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
    npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

    It's happening the launch. npm install♪ So some of the modules just haven't been properly installed... How can you fix it?



  • Problem solved. Used npm update And it's



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2