Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bugfix: native module resolution is broken#3680

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Goli4thus wants to merge1 commit intoelectron-react-boilerplate:main
base:main
Choose a base branch
Loading
fromGoli4thus:bugfix/native_module_resolution

Conversation

Goli4thus
Copy link

Even though the official 'package.json' docs regarding "main" property make it seems like the recently introduced 'electronmon .' approach could work, it turns out that's not the case.

When going via 'main' property, regardless of the specified path, the actual "nodejs module resolution" will start at the '/node_modules/' level and then bubble upwards. As a result the symlinked folders '/src/node_modules' and '<repo/.erb/node_modules/' will not be considered, hence native module resolution breaks.

The solution is simply to specify the 'main.bundle.dev.js' file directly in regards to the 'electronmon' call.

Furthermore the 'main' property was removed altogether now, cause it seemingly serves no practical purpose in this template and at best is misleading if it were to stay around.

Even though the official 'package.json' docs regarding "main" propertymake it seems like the recently introduced 'electronmon .' approachcould work, it turns out that's not the case.When going via 'main' property, regardless of the specified path, theactual "nodejs module resolution" will start at the'<repo>/node_modules/' level and then bubble upwards.As a result the symlinked folders '<repo>/src/node_modules' and'<repo/.erb/node_modules/' will not be considered, hence native moduleresolution breaks.The solution is simply to specify the 'main.bundle.dev.js' file directlyin regards to the 'electronmon' call.Furthermore the 'main' property was removed altogether now, cause itseemingly serves no practical purpose in this template and at best ismisleading if it were to stay around.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@Goli4thus

[8]ページ先頭

©2009-2025 Movatter.jp