cursor icon indicating copy to clipboard operation
cursor copied to clipboard

when run package has some error

Open IOLOII opened this issue 2 years ago • 1 comments
trafficstars

running log :

 *  正在执行任务: npm run prepare 


> [email protected] prepare
> cd .. && husky install .husky

fatal: not a git repository (or any of the parent directories): .git
husky - git command not found, skipping install
 *  终端将被任务重用,按任意键关闭。 

 *  正在执行任务: npm run make 


> [email protected] make
> electron-forge make

✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: zip
❯ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
      ✔ [plugin-webpack] Preparing native dependencies: 1 / 1
      ✔ [plugin-webpack] Building webpack bundles
  ❯ Packaging application
    ❯ Packaging for arm64 on darwin
      ✔ Copying files
      ✔ Preparing native dependencies [1s]
      ✖ Finalizing package
        › ENOENT: no such file or directory, lstat './resources'
  ◼ Running postPackage hook
◼ Running preMake hook
◼ Making distributables
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: ENOENT: no such file or directory, lstat './resources'

Error: no such file or directory, lstat './resources'

IOLOII avatar Mar 26 '23 09:03 IOLOII

how to fix?

IOLOII avatar Mar 26 '23 09:03 IOLOII

@IOLOII you should create the 'resources' directory under the root of the project directory.

alexwebdevs avatar Mar 26 '23 18:03 alexwebdevs

@IOLOII you should create the 'resources' directory under the root of the project directory.

@alexwebdevs You are right.

But also have some question:

  1. What's this resources directory use for? I find in forge.config.js file.
  2. There has error when run production: CleanShot 2023-03-28 at 00 42 30
A JavaScript error occurred in the main process

Uncaught Exception:
Error: Cannot find module 'node-pty'
Require stack:
- /Users/ioloii/Desktop/repos/cursor/out/Cursor-darwin-arm64/Cursor.app/Contents/Resources/app/.webpack/main/index.js
- 
at Module._resolveFilename (node:internal/modules/cjs/loader:963:15)
at n._resolveFilename (node:electron/js2c/browser_init:2:109416)
at Module._load (node:internal/modules/cjs/loader:811:27)
at f._load (node:electron/js2c/asar_bundle:2:13328)
at Module.require (node:internal/modules/cjs/loader:1035:19)
at require (node:internal/modules/cjs/helpers:102:18)
at 17313 (/Users/ioloii/Desktop/repos/cursor/out/Cursor-darwin-arm64/Cursor.app/Contents/Resources/app/.webpack/main/index.js:8:942991)
at n (/Users/ioloii/Desktop/repos/cursor/out/Cursor-darwin-arm64/Cursor.app/Contents/Resources/app/.webpack/main/index.js:8:972533)
at /Users/ioloii/Desktop/repos/cursor/out/Cursor-darwin-arm64/Cursor.app/Contents/Resources/app/.webpack/main/index.js:8:973611
at Object.<anonymous> (/Users/ioloii/Desktop/repos/cursor/out/Cursor-darwin-arm64/Cursor.app/Contents/Resources/app/.webpack/main/index.js:8:973638)

npm run start has success running

Environment: Mac mini m1 macOS Monterey 12.6.3 Typescript: 4.9.0-dev.20220902

Vscode version: 1.76.0 commit: 92da9481c0904c6adfe372c12da3b7748d74bdcb date: 2023-03-01T10:23:06.752Z browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 12_6_3) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.76.0 Chrome/102.0.5005.196 Electron/19.1.11 Safari/537.36

IOLOII avatar Mar 27 '23 16:03 IOLOII

As this is a v0.1.0 error, and there's not been much activity for a while, I'll close this to keep the Issues clean.

Feel free to comment if you'd still like support, but it appears you initial issue was resolved :)

danperks avatar Apr 14 '23 20:04 danperks