project-error / npwd

NPWD is a FiveM phone resource written entirely in TypeScript and React.
https://projecterror.dev
Other
351 stars 277 forks source link

Bug: Yarn not building - dependency issue #944

Closed jellyton255 closed 1 year ago

jellyton255 commented 1 year ago

Development Issue

No

Phone Version

396fdfb

Issue Description

When the resource is being built, it fails with this error:

> ensure npwd
[ citizen-server-impl] Running build tasks on resource npwd - it'll restart once completed.
[ citizen-server-impl] Couldn't start resource npwd.
[         script:yarn] [yarn] yarn install v1.22.5
[         script:yarn] 
[         script:yarn] [yarn] [1/4] Resolving packages...
[         script:yarn] 
[         script:yarn] Error: [yarn] warning workspace-aggregator-1e97cfd2-df3f-4ed5-8d54-376ae1465999 > npwd-game > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
[         script:yarn] 
[         script:yarn] [yarn] [2/4] Fetching packages...
[         script:yarn] 
[         script:yarn] Error: [yarn] error jest-worker@29.3.1: The engine "node" is incompatible with this module. Expected version "4.15.0 || 6.10.0 || >=18.0.0". Got "16.9.1"
[         script:yarn] 
[         script:yarn] Error: [yarn] error Found incompatible module.
[         script:yarn] 
[         script:yarn] [yarn] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[         script:yarn] 
[ citizen-server-impl] Building resource npwd failed.
[ citizen-server-impl] Error data: yarn failed!

Issue Reproduction

  1. Start the resource
  2. Failure

Evidence

chrome - January02 - 20 49 - 1484

BedeX commented 1 year ago

Same here

natan-fernandes commented 1 year ago

Build the phone manually using yarn and then create an empty file called .yarn.installed on the root of the resource

BedeX commented 1 year ago

How can i do that?

BedeX commented 1 year ago

If you have version 1.7.0 download the 1.7.1 files and drag it to the resource folder, it solved for me

jellyton255 commented 1 year ago

Just need to downgrade node version, which is dead easy.