vercel / pkg

Package your Node.js project into an executable
https://npmjs.com/pkg
MIT License
24.28k stars 1.01k forks source link

Not able to create binaries for axios node package #2042

Closed ronak1009 closed 8 months ago

ronak1009 commented 8 months ago

What version of pkg are you using?

5.8.1

What version of Node.js are you using?

20.10

What operating system are you using?

Ubuntu 20.04

What CPU architecture are you using?

x64

What Node versions, OSs and CPU architectures are you building for?

node18-linux-x64

Describe the Bug

My node app uses axios libraries to make rest calls. When running the packaging for this app using pkg, pkg index.js -t node18-linux-x64 , I see following warning with not binaries created. In my package.json, I have set "output": "dist" directory to store the created binaries.

pkg@5.8.1
> Warning Failed to make bytecode node18-x64 for file /snapshot/service/node_modules/axios/index.js
> Warning Failed to make bytecode node18-x64 for file /snapshot/service/node_modules/axios/lib/axios.js

Expected Behavior

Binaries should have created.

To Reproduce

add axios 1.6.3 to the project dependencies using axios within your app run pkg