Unable to make the build of GDevelop

I am unable to make the build of GDevelop. When I try to do npm run build I get below error

` Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/lib/binding/Release/electron-v8.2-darwin-x64/fse.node --module_name=fse --module_path=/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/lib/binding/Release/electron-v8.2-darwin-x64 --napi_version=4 --node_abi_napi=napi’ (1)

                errorOut=node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-electron-v8.2-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and electron@8.2.5 (electron-v8.2 ABI, unknown) (falling back to source compile with node-gyp)`

Also here are some more error logs for more details.

gyp ERR! build error gyp ERR! stack Error: makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Darwin 19.5.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/lib/binding/Release/electron-v8.2-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/lib/binding/Release/electron-v8.2-darwin-x64" "--napi_version=4" "--node_abi_napi=napi" gyp ERR! cwd /Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents gyp ERR! node -v v10.16.0 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/lib/binding/Release/electron-v8.2-darwin-x64/fse.node --module_name=fse --module_path=/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/lib/binding/Release/electron-v8.2-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) node-pre-gyp ERR! System Darwin 19.5.0 node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /Users/ravikapuriya/Documents/GDevelop-ide-test/GDevelop/newIDE/electron-app/app/node_modules/fsevents node-pre-gyp ERR! node -v v10.16.0 node-pre-gyp ERR! node-pre-gyp -v v0.10.0 node-pre-gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! fsevents@1.2.4 install:node install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fsevents@1.2.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ravikapuriya/.npm/_logs/2020-08-05T06_00_18_486Z-debug.log

                command=/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js rebuild fsevents@1.2.9 fsevents@1.2.4

:x: Electron build failed with code 1.
npm ERR! errno 1
npm ERR! gdevelop@1.0.0 build: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gdevelop@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

If you can’t understand this output you are probably not experienced enough to use the development version, you should use the prebuilt binaries.

The error looks simple here: you don’t have prebuilt binaries for your node version for fsevents and you don’t have the tools to build it manually. Either use the latest LTS version of node or install the native module build toolchain

Thanks for the replay. Sorry for this.
I have already Node V12.8.3 LTS. But even though I am getting the same issue. I have also updated all the packages to the latest version.
Anything I am missing? Or anything more details you want let me know.

Before this I was using GDevelop v5.0.0-beta88 version and everything was working fine and few days back, I updated to the latest GDevelop v5.0.0-beta98, after that I am getting this issues.

Again use the prebuilt release binaries don’t build them yourself.

The log says you are using node V10. You will need to install a node modules compiler toolchain and build the module manually. See node-gyp documentation

After updating the Node version to latest LTS 12.8 & also installed node modules compiler toolchain. I am getting this error, when I am trying to install the npm inside GDevelop/newIDE/app/ folder

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@storybook/addon-links/-/addon-links-5.1.9.tgz
npm ERR! 404
npm ERR! 404 ‘@storybook/addon-links@5.1.9’ is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of ‘app’
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Also getting this error as well for the all the dependencies.

npm WARN tar ENOENT: no such file or directory, open '/Users/ravikapuriya/Documents/explore-test/explore-extensions/GDevelop/newIDE/app/node_modules/.staging/*

@arthuro555 Can you please help on this. I am stuck on this from long.

Hi @arthuro555, I am able to solve all the above errors by updating the npm version to the latest LTS 12.8. Also I am able to run the app through the npm run electron-mac command.After that through the deploy command I am able to generate a build. But when I am try to run the generated build of Mac, I am getting the error as below,

Uncaught Exception:

Error: Cannot find module ‘discord-rich-presence’

Require stack:

  • /Users/usrName/Documents/as-GDevelop/GDevelop/newIDE/electron-app/dist/mac/GDevelop 5.app/Contents/Resources/app.asar/DiscordRichPresence.js

at Module._resolveFilename (internal/modules/cjs/loader.js:798:15)
at Function…/lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/browser_init.js:7620:16)
at Module._load (internal/modules/cjs/loader.js:691:27)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at Module.require (internal/modules/cjs/loader.js:853:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/Users/ravikapuriya/Documents/as-GDevelop/GDevelop/newIDE/electron-app/dist/mac/GDevelop 5.app/Contents/Resources/app.asar/DiscordRichPresence.js:1:23)
at Module._compile (internal/modules/cjs/loader.js:968:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:986:10)

Please help me in solving this. Thanks in advance.

In newIDE/electron/app
Install the packages with yarn or npm.

@Bouh Thanks for the reply.
I already did that. npm install discord-rich-presence -g --verbose. Then I rebuild it, again getting the same error.