SyntaxError: Unexpected string when running electron-builder install-app-deps with yarn@berry
See original GitHub issue- Version: 22.7.0
- Electron Version: 8.2.5
- Electron Type (current, beta, nightly): current
- Target: default target
I tried to integrate yarn2 (yarn@berry). Our repo contains an Electron App with sqlite3 as a dependency, that get “built” by node-pre-gyp when building the app. Whenn electron-builder tries to rebuild the native dependencies, the following error is thrown:
• electron-builder version=22.7.0
• rebuilding native dependencies dependencies=sqlite3@4.2.0 platform=linux arch=x64
• rebuilding native dependency name=sqlite3 version=4.2.0
⨯ cannot execute cause=exit status 1
errorOut=/tmp/tmp-2426rUi2pP55zel/yarn:2
exec "/usr/local/bin/node" '/project/electron-builder-yarn2/node_modules/yarn/bin/yarn.js' "$@"
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected string
at wrapSafe (internal/modules/cjs/loader.js:1047:16)
at Module._compile (internal/modules/cjs/loader.js:1097:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
command=/tmp/tmp-2426rUi2pP55zel/node /tmp/tmp-2426rUi2pP55zel/yarn run install
workingDir=/project/electron-builder-yarn2/node_modules/sqlite3
A minimal Reproduction can be found here: https://github.com/Thomb89/electron-builder-yarn2
This error can be reproduced in the docker image (i used electronuserland/builder:wine) with the following steps:
- docker run -it electronuserland/builder:wine /bin/bash
- npm i -g yarn@berry
- git clone https://github.com/Thomb89/electron-builder-yarn2.git
- cd electron-builder-yarn2
- yarn
- yarn electron-builder install-app-deps
While yarn@berry is still not released (current version is 2.0.0-rc.27), will it be fully supported in the future?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:13
Top Results From Across the Web
Unexpected token '?' when creating new app using electron ...
SyntaxError : Unexpected token '? ... I had trying to create a new app with the new electron forge version 6, and I...
Read more >Error Codes | Yarn - Package Manager
A file from the cache has been detected unused while installing dependencies. Running yarn cache clean will cause Yarn to remove everything inside...
Read more >Untitled
Types of male speaking voices, Longest running tv series supernatural? G-force formula physics. Bo diddley song, Parker gold pen and pencil set, ...
Read more >Error when running cleanbuild - Snapcraft forum
stage-packages , after , build , install , and prime are now under apps/fastmail which is wrong. They belong under parts/electron-app .
Read more >Untitled
#Therapeia Copy on first write, Hanamint st moritz collection, Praxis vogtmann buckenhof, Add your logo to lightroom, Mulan chinese in muncy pa, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m still experiencing this, worth keeping open
I just saw this today, yarn
3.1.1
, electron-builder22.10.5
.nodeLinker
isnode-modules
.