Skip to content

The fsevents dependency is causing a build failure on Windows 11. #613

Open
@joshua-jojo

Description

@joshua-jojo

What were you trying to do?

I installed it according to the documentation and immediately ran the build without adding or changing anything.

What happened?

The build failed.

How to reproduce the bug

$ php artisan native:build win x64

===================================================================

                 * * * INSECURE BUILD * * *

===================================================================

Secure app bundle not found! Building with exposed source files.

See https://nativephp.com/docs/publishing/building#security

===================================================================

Updating Electron dependencies...

npm warn skipping integrity check for git dependency ssh://[email protected]/electron/node-gyp.git
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm warn deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm warn deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.
npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

[email protected] postinstall
node ./node_modules/electron-builder/cli.js install-app-deps

npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup 'C:\Users\joshu\OneDrive\Desktop\belajar\EasyAlarm\vendor\nativephp\electron\resources\js\node_modules\iconv-corefoundation\node_modules\emoji-regex',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\joshu\OneDrive\Desktop\belajar\EasyAlarm\vendor\nativephp\electron\resources\js\node_modules\iconv-corefoundation\node_modules\emoji-regex'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'C:\Users\joshu\OneDrive\Desktop\belajar\EasyAlarm\vendor\nativephp\electron\resources\js\node_modules\iconv-corefoundation\node_modules\emoji-regex'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
• electron-builder version=26.0.15
• updater config { provider: 'spaces', name: null, region: null, path: null }
• loaded configuration file=C:\Users\joshu\OneDrive\Desktop\belajar\EasyAlarm\vendor\nativephp\electron\resources\js\electron-builder.js
• executing @electron/rebuild electronVersion=32.3.3 arch=x64 buildFromSource=false appDir=./
• installing native dependencies arch=x64
• completed installing native dependencies

added 1003 packages, and audited 1004 packages in 10s

188 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Copying App to build directory...

Copying latest CA Certificate...

Cleaning .env file...

Copying app icons...

Pruning vendor directory

Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 1 install, 0 updates, 49 removals

  • Removing theseer/tokenizer (1.2.3)
  • Removing ta-tikoma/phpunit-architecture-test (0.8.5)
  • Removing symfony/yaml (v7.3.0)
  • Removing staabm/side-effects-detector (1.0.5)
  • Removing sebastian/version (5.0.2)
  • Removing sebastian/type (5.1.2)
  • Removing sebastian/recursion-context (6.0.2)
  • Removing sebastian/object-reflector (4.0.1)
  • Removing sebastian/object-enumerator (6.0.1)
  • Removing sebastian/lines-of-code (3.0.1)
  • Removing sebastian/global-state (7.0.2)
  • Removing sebastian/exporter (6.3.0)
  • Removing sebastian/environment (7.2.1)
  • Removing sebastian/diff (6.0.2)
  • Removing sebastian/complexity (4.0.1)
  • Removing sebastian/comparator (6.3.1)
  • Removing sebastian/code-unit-reverse-lookup (4.0.1)
  • Removing sebastian/code-unit (3.0.3)
  • Removing sebastian/cli-parser (3.0.2)
  • Removing phpunit/phpunit (11.5.15)
  • Removing phpunit/php-timer (7.0.1)
  • Removing phpunit/php-text-template (4.0.1)
  • Removing phpunit/php-invoker (5.0.1)
  • Removing phpunit/php-file-iterator (5.1.0)
  • Removing phpunit/php-code-coverage (11.0.9)
  • Removing phpstan/phpdoc-parser (2.1.0)
  • Removing phpdocumentor/type-resolver (1.10.0)
  • Removing phpdocumentor/reflection-docblock (5.6.2)
  • Removing phpdocumentor/reflection-common (2.2.0)
  • Removing phar-io/version (3.2.1)
  • Removing phar-io/manifest (2.0.4)
  • Removing pestphp/pest-plugin-mutate (v3.0.5)
  • Removing pestphp/pest-plugin-laravel (v3.2.0)
  • Removing pestphp/pest-plugin-arch (v3.1.1)
  • Removing pestphp/pest-plugin (v3.0.0)
  • Removing pestphp/pest (v3.8.2)
  • Removing nunomaduro/collision (v8.8.0)
  • Removing myclabs/deep-copy (1.13.1)
  • Removing mockery/mockery (1.6.12)
  • Removing laravel/sail (v1.43.1)
  • Removing laravel/pint (v1.22.1)
  • Removing laravel/pail (v1.2.3)
  • Removing jean85/pretty-package-versions (2.1.1)
  • Removing hamcrest/hamcrest-php (v2.1.1)
  • Removing filp/whoops (2.18.1)
  • Removing fidry/cpu-core-counter (1.2.0)
  • Removing fakerphp/faker (v1.24.1)
  • Removing doctrine/deprecations (1.1.5)
  • Removing brianium/paratest (v7.8.3)
  • Installing nativephp/php-bin (1.0.2): Extracting archive
    0/40 [>---------------------------] 0%
    9/40 [======>---------------------] 22%
    26/40 [==================>---------] 65%
    38/40 [==========================>-] 95%
    40/40 [============================] 100%
    Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

INFO Discovering packages.

inertiajs/inertia-laravel ................................................................................................................... DONE
laravel/tinker .............................................................................................................................. DONE
nativephp/electron .......................................................................................................................... DONE
nativephp/laravel ........................................................................................................................... DONE
nesbot/carbon ............................................................................................................................... DONE
nunomaduro/termwind ......................................................................................................................... DONE
tightenco/ziggy ............................................................................................................................. DONE

56 packages you are using are looking for funding.
Use the composer fund command to find out more!

Building for win-x64

[email protected] build:win-x64
cross-env npm run build && cross-env node ./node_modules/electron-builder/cli.js -p never --win --config --x64

[email protected] build
electron-vite build

vite v6.3.5 building SSR bundle for production...
transforming...
renderer config is missing
✓ 33 modules transformed.
rendering chunks...
out/main/index.js 69.99 kB
✓ built in 150ms
vite v6.3.5 building SSR bundle for production...
transforming...
✓ 1 modules transformed.
rendering chunks...
out/preload/index.mjs 0.17 kB
✓ built in 5ms
• electron-builder version=26.0.15 os=10.0.26100
• updater config { provider: 'spaces', name: null, region: null, path: null }
• loaded configuration file=C:\Users\joshu\OneDrive\Desktop\belajar\EasyAlarm\vendor\nativephp\electron\resources\js\electron-builder.js
• building php binary - exec php.js --win --x64
• skipped dependencies rebuild reason=npmRebuild is set to false
• packaging platform=win32 arch=x64 electron=32.3.3 appOutDir=C:\Users\joshu\OneDrive\Desktop\belajar\EasyAlarm\dist\win-unpacked
⨯ ENOENT: no such file or directory, scandir 'C:\Users\joshu\OneDrive\Desktop\belajar\EasyAlarm\vendor\nativephp\electron\resources\js\node_modules\fsevents' failedTask=build stackTrace=Error: ENOENT: no such file or directory, scandir 'C:\Users\joshu\OneDrive\Desktop
\belajar\EasyAlarm\vendor\nativephp\electron\resources\js\node_modules\fsevents'

Debug Output

{
"Environment": {
"PHP": {
"Version": "8.4.8",
"Path": "C:\laragon\bin\php\php-8.4.8-nts-Win32-vs17-x64\php.exe"
},
"Laravel": {
"Version": "12.17.0",
"ConfigCached": false,
"RoutesCached": false,
"DebugEnabled": true
},
"Node": {
"Version": "v22.16.0",
"Path": "C:\Program Files\nodejs\node.exe"
},
"NPM": {
"Version": "11.4.1",
"Path": "C:\Program Files\nodejs\npm\r\nC:\Program Files\nodejs\npm.cmd\r\nC:\Users\joshu\AppData\Roaming\npm\npm\r\nC:\Users\joshu\AppData\Roaming\npm\npm.cmd"
},
"OperatingSystem": "WINNT"
},
"NativePHP": {
"Versions": {
"nativephp/electron": "1.1.0.0",
"nativephp/laravel": "1.1.0.0",
"nativephp/php-bin": "1.0.2.0"
},
"Configuration": {
"Provider": "App\Providers\NativeAppServiceProvider",
"BuildHooks": {
"Pre": [],
"Post": []
},
"NotarizationEnabled": false,
"CustomPHPBinary": false
}
}
}

Which operating systems have you seen this occur on?

Windows

Notes

I'm not familiar with Electron Builder, so I am unable to provide a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions