nodeIntegration false by default in 2021
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
[REQUIRED] Describe expected behavior
NodeJS native require() should work in root of index.html
Describe the problem
[REQUIRED] Actual Behavior
require() not a defined function
[REQUIRED] Steps to reproduce the behavior
npm run start, open dev inspection, view console
[REQUIRED] Environment
- AppAuth-JS version: current version as of 8.15.2021
- AppAuth-JS Environment (Node, Browser (UserAgent), ...): Electron 12.0.2
- Source code snippts (inline or JSBin)
Fix is applied to index.ts by making the following change starting on line 27
w = new BrowserWindow(
{
width: 1280, height: 720, icon: 'assets/app_icon.png',
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
}
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review index.ts around line 27, where the Electron BrowserWindow is configured. Run npm run start, open the developer inspection console, and reproduce the missing require() behavior. Done means the reported root index.html environment supports the expected NodeJS require() behavior in Electron 12.0.2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100