Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Build Nextron #481

Open
cammycurry opened this issue Aug 2, 2024 · 3 comments
Open

Unable to Build Nextron #481

cammycurry opened this issue Aug 2, 2024 · 3 comments

Comments

@cammycurry
Copy link

I am unable to build Nextron projects from fresh install.

npx create-nextron-app my-app --example with-tailwindcss
npm install
npm build

run My Nextron App-1.0.0-arm64.dmg

Drag application into Application folder

Double click to run on completion

CleanShot 2024-08-02 at 13 08 41@2x

Uncaught Exception:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Volumes/My Nextron App 1.0.0-arm64/My Nextron App.app/Contents/Resources/app.asar/node_modules/path-exists/index.js from /Volumes/My Nextron App 1.0.0-arm64/My Nextron App.app/Contents/Resources/app.asar/node_modules/locate-path/index.js not supported.
Instead change the require of /Volumes/My Nextron App 1.0.0-arm64/My Nextron App.app/Contents/Resources/app.asar/node_modules/path-exists/index.js in /Volumes/My Nextron App 1.0.0-arm64/My Nextron App.app/Contents/Resources/app.asar/node_modules/locate-path/index.js to a dynamic import() which is available in all CommonJS modules.
at c._load (node:electron/js2c/node_init:2:17025)
at Object. (/Volumes/My Nextron App 1.0.0-arm64/My Nextron App.app/Contents/Resources/app.asar/node_modules/locate-path/index.js:3:20)

@palbrecht1
Copy link

palbrecht1 commented Aug 8, 2024

I have the same issue here
edit: this issue seems to arise when using electron-serve 2.0.0 and electron-store 10.0.0

@lisy999
Copy link

lisy999 commented Aug 22, 2024

我也想知道这个问题的答案

@martivj
Copy link

martivj commented Sep 1, 2024

I got it working simply by moving all 'electron-xx' dependencies over to devDependencies. See #458.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants