nodeplotlib
nodeplotlib copied to clipboard
Wrong url when packaged into binary
Describe the bug
package into binary using @yao-pkg/[email protected]
and got error
Error: File or directory 'C:\**\PSOandGA\node_modules\nodeplotlib\src\lib\server\web\index.html' was not included into executable at compilation stage. Please recompile adding it as asset or script.
URL is clearly wrong bcs it added a C:\**\PSOandGA
into the url since my node_module url should be D:\NUTN\112\軟式計算\HW\PSOandGA\node_modules
, other packages won't get this error, I think it's bcs of the "trying open a web page" part
To Reproduce Steps to reproduce the behavior:
- plot something using index.js
- npm i @yao-pkg/pkg
- add
"main": "index.js",
topackage.json
-
pkg .
- execute exe
Expected behavior
Print some plot like this
Screenshots
Desktop (please complete the following information):
- OS: win11
- Browser chrome
Additional context console logs:
[Nest] 3956 - 2024-06-07 23:26:27 LOG [NestFactory] Starting Nest application...
[Nest] 3956 - 2024-06-07 23:26:27 LOG [InstanceLoader] ServerModule dependencies initialized +11ms
[Nest] 3956 - 2024-06-07 23:26:27 LOG [InstanceLoader] ServeStaticModule dependencies initialized +1ms
[Nest] 3956 - 2024-06-07 23:26:27 LOG [WebSocketsController] PlotsGateway subscribed to the "readplots" message +33ms
[Nest] 3956 - 2024-06-07 23:26:27 LOG [NestApplication] Nest application successfully started +2ms
[Nodeplotlib] Server running at http://localhost:52118
[Nest] 3956 - 2024-06-07 23:26:27 ERROR [ExceptionsHandler] File or directory 'C:\**\PSOandGA\node_modules\nodeplotlib\src\lib\server\web\index.html' was not included into executable at compilation stage. Please recompile adding it as asset or script.
Error: File or directory 'C:\**\PSOandGA\node_modules\nodeplotlib\src\lib\server\web\index.html' was not included into executable at compilation stage. Please recompile adding it as asset or script.
at error_ENOENT (pkg/prelude/bootstrap.js:657:19)
at findNativeAddonForStat (pkg/prelude/bootstrap.js:1445:32)
at statFromSnapshot (pkg/prelude/bootstrap.js:1468:25)
at Object.stat (pkg/prelude/bootstrap.js:1494:5)
at SendStream.sendFile (C:\snapshot\PSOandGA\node_modules\send\index.js:717:6)
at SendStream.pipe (C:\snapshot\PSOandGA\node_modules\send\index.js:591:8)
at sendfile (C:\snapshot\PSOandGA\node_modules\express\lib\response.js:1130:8)
at ServerResponse.sendFile (C:\snapshot\PSOandGA\node_modules\express\lib\response.js:449:3)
at renderFn (C:\snapshot\PSOandGA\node_modules\@nestjs\serve-static\dist\loaders\express.loader.js:31:25)
at Layer.handle [as handle_request] (C:\snapshot\PSOandGA\node_modules\express\lib\router\layer.js:95:5)
[Nest] 3956 - 2024-06-07 23:26:27 ERROR [ExceptionsHandler] File or directory 'C:\**\PSOandGA\node_modules\nodeplotlib\src\lib\server\web\index.html' was not included into executable at compilation stage. Please recompile adding it as asset or script.
Error: File or directory 'C:\**\PSOandGA\node_modules\nodeplotlib\src\lib\server\web\index.html' was not included into executable at compilation stage. Please recompile adding it as asset or script.
at error_ENOENT (pkg/prelude/bootstrap.js:657:19)
at findNativeAddonForStat (pkg/prelude/bootstrap.js:1445:32)
at statFromSnapshot (pkg/prelude/bootstrap.js:1468:25)
at Object.stat (pkg/prelude/bootstrap.js:1494:5)
at SendStream.sendFile (C:\snapshot\PSOandGA\node_modules\send\index.js:717:6)
at SendStream.pipe (C:\snapshot\PSOandGA\node_modules\send\index.js:591:8)
at sendfile (C:\snapshot\PSOandGA\node_modules\express\lib\response.js:1130:8)
at ServerResponse.sendFile (C:\snapshot\PSOandGA\node_modules\express\lib\response.js:449:3)
at renderFn (C:\snapshot\PSOandGA\node_modules\@nestjs\serve-static\dist\loaders\express.loader.js:31:25)
at Layer.handle [as handle_request] (C:\snapshot\PSOandGA\node_modules\express\lib\router\layer.js:95:5)
my folder screenshot: