Relative path to HTML file no longer works (package.json - main)
See original GitHub issueHello.
First things first: NWJS: 13.0 x64 DEV and 13.2 x64 DEV OS: Win 10 Home x64
Relative path to main HTML file cannot be used anymore. It was working fine on 0.12.3 but now I must do one of two things:
- put main HTML together with package.json
- set absolute path to main HTML in package.json->main (not an option for me).
If I try to use relative path, then I get:
Nie znaleziono pliku (File not found)
Mógł zostać przeniesiony lub usunięty. (It could be moved or deleted.) ERR_FILE_NOT_FOUND
I believe it is not intended behavior because I haven’t found this in documentation.
Files structure
PROJECT_ROOT
┣ NWJS
┃ ┗ package.json
┣ start.html
┗ start.bat
package.json
{
"main": "../start.html",
"name": "AppName",
"description": "",
"version": "1",
"nodejs": true,
"window": {
"title": "app title",
"icon": "",
"frame": true,
"width": 920,
"height": 520,
"position": "center"
},
"webkit": {
"plugin": false
},
"chromium-args": "--data-path='NWJS/Storage' --user-data-dir='NWJS/User data'"
}
start.bat
@echo off
cd /d %~dp0
start "" "..\..\bin\0.13.2 SDK\x64\nw.exe" "%cd%/NWJS" %*
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
reactjs - Relative path in index.html after build - Stack Overflow
I'm using Photino.io building React JS to create UI for .NET cross-platform apps & the package.json was not using this so it couldn't...
Read more >Path | Node.js v19.3.0 Documentation
The node:path module provides utilities for working with file and directory paths. It can be accessed using: const path = require('node:path'); ...
Read more >rollup.js
So far, we've created a simple bundle from an entry point and a module imported via a relative path. As you build more...
Read more >Documentation - Module Resolution - TypeScript
Ask the folder /root/src/moduleB if it contains a file named package.json that specifies a "main" module. In our example, if Node.js found the...
Read more >package.json - npm Docs
This should be a module relative to the root of your package folder. For most modules, it makes the most sense to have...
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
will add a command line flag to specify project root.
I’m having the same issue…is this going to be solved in some way?