chrisrabe / bitburner-automation

Automation scripts I use for my Bitburner gameplay videos.
125 stars 40 forks source link

Import error on auto-deploy #32

Open dutins12 opened 1 year ago

dutins12 commented 1 year ago

"Failed to resolve module specifier "./utils.js". Invalid relative url or base scheme isn't hierarchical."

This is from copypasting the current script, i'm a total beginner in coding so i don't know how this problem is solved

virtuallyaverage commented 1 year ago

I am getting this too

virtuallyaverage commented 1 year ago

Figured it out, so need to make sure that you have created the utils.js file on the server you are trying to run it on. You can find it in the folder here. Then make sure that the top lines in your auto-deploy.js script are import { getNetworkNodes, canPenetrate, hasRam, getRootAccess, } from "/utils.js";

rfsjim commented 1 year ago

Can you confirm where you are trying to run this script?

auto-deploy.js takes one argument that is required - the name of the target server to hack for example ensure that you are running this on the home server by typing home first run auto-deploy.js n00dles

This will then locate machines to run the script on, deploy hacks to those machines (if required), and copy and run the virus.