R
Railwayβ€’9mo ago
ched_dev

Adding support for python with isolated-vm npm package

Hello, I am using a project that requires the isolated-vm npm package (https://www.npmjs.com/package/isolated-vm) which depends on a python installation for building. Currently I run node@18.12.1, but how can I add python to run along with it? Some logs attached in thread.
npm
isolated-vm
Access to multiple isolates. Latest version: 4.6.0, last published: 2 months ago. Start using isolated-vm in your project by running npm i isolated-vm. There are 43 other projects in the npm registry using isolated-vm.
6 Replies
Percy
Percyβ€’9mo ago
Project ID: N/A
Brody
Brodyβ€’9mo ago
add a nixpacks.toml to your project that contains this
[phases.setup]
nixPkgs = ['...', 'python38']
[phases.setup]
nixPkgs = ['...', 'python38']
ched_dev
ched_devβ€’9mo ago
Great! that got me further, but still errors. Seems vague, would you happen to have any idea where I can go from here?
#10 32.88 npm ERR! make: g++: No such file or directory

#10 32.88 npm ERR! make: *** [nortti.target.mk:158: Release/obj.target/nortti/src/isolate/allocator_nortti.o] Error 127

#10 32.88 npm ERR! make: *** Waiting for unfinished jobs....

#10 32.88 npm ERR! make: g++: No such file or directory

#10 32.88 npm ERR! make: *** [nortti.target.mk:158: Release/obj.target/nortti/src/external_copy/serializer_nortti.o] Error 127

#10 32.88 npm ERR! gyp ERR! build error

#10 32.88 npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2

#10 32.88 npm ERR! gyp ERR! stack at ChildProcess.onExit (/app/node_modules/node-gyp/lib/build.js:194:23)

#10 32.88 npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)

#10 32.88 npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)

#10 32.88 npm ERR! gyp ERR! System Linux 5.10.0-25-cloud-amd64

#10 32.88 npm ERR! gyp ERR! command "/nix/store/7ppnyqmp1c92gkfrixbz99sw7q6ifkg1-nodejs-18.12.1/bin/node" "/app/node_modules/.bin/node-gyp" "rebuild" "--release" "-j" "4"

#10 32.88 npm ERR! gyp ERR! cwd /app/node_modules/isolated-vm

#10 32.88 npm ERR! gyp ERR! node -v v18.12.1
#10 32.88 npm ERR! make: g++: No such file or directory

#10 32.88 npm ERR! make: *** [nortti.target.mk:158: Release/obj.target/nortti/src/isolate/allocator_nortti.o] Error 127

#10 32.88 npm ERR! make: *** Waiting for unfinished jobs....

#10 32.88 npm ERR! make: g++: No such file or directory

#10 32.88 npm ERR! make: *** [nortti.target.mk:158: Release/obj.target/nortti/src/external_copy/serializer_nortti.o] Error 127

#10 32.88 npm ERR! gyp ERR! build error

#10 32.88 npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2

#10 32.88 npm ERR! gyp ERR! stack at ChildProcess.onExit (/app/node_modules/node-gyp/lib/build.js:194:23)

#10 32.88 npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)

#10 32.88 npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)

#10 32.88 npm ERR! gyp ERR! System Linux 5.10.0-25-cloud-amd64

#10 32.88 npm ERR! gyp ERR! command "/nix/store/7ppnyqmp1c92gkfrixbz99sw7q6ifkg1-nodejs-18.12.1/bin/node" "/app/node_modules/.bin/node-gyp" "rebuild" "--release" "-j" "4"

#10 32.88 npm ERR! gyp ERR! cwd /app/node_modules/isolated-vm

#10 32.88 npm ERR! gyp ERR! node -v v18.12.1
Brody
Brodyβ€’9mo ago
try this now
[phases.setup]
nixPkgs = ['...', 'python38', 'gcc']
[phases.setup]
nixPkgs = ['...', 'python38', 'gcc']
also for sending logs, it would be easier for both of us if you could use this https://bookmarklets.up.railway.app/log-downloader/
ched_dev
ched_devβ€’9mo ago
got the bookmarlet set up for next time. That solved it! thanks for your help brody! you da best.
Brody
Brodyβ€’9mo ago
no problem! πŸ™‚