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

Wrong url when packaged into binary #92

Open
DanielBUBU opened this issue Jun 7, 2024 · 0 comments
Open

Wrong url when packaged into binary #92

DanielBUBU opened this issue Jun 7, 2024 · 0 comments

Comments

@DanielBUBU
Copy link

DanielBUBU commented Jun 7, 2024

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:

  1. plot something using index.js
  2. npm i @yao-pkg/pkg
  3. add "main": "index.js", to package.json
  4. pkg .
  5. execute exe

Expected behavior
Print some plot like this
image

Screenshots
image

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:
image

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

1 participant