getcursor / cursor

The AI Code Editor
https://cursor.com
25.62k stars 1.59k forks source link

when run package has some error #251

Closed IOLOII closed 1 year ago

IOLOII commented 1 year ago

running log :

 *  正在执行任务: npm run prepare 

> Cursor@0.1.7 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 

> Cursor@0.1.7 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 commented 1 year ago

how to fix?

alexwebdevs commented 1 year ago

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

IOLOII commented 1 year ago

@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:

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

danperks commented 1 year ago

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 :)