compute function of neuralnet package gives an error

You can just post a a reprex (see the FAQ). For the data, just enough to reproduce the error is needed and it doesn't need to be the actual data so long as its the same type and variable names. If the data is fake, obviously the results will be bogus, but for now we just need to trace the place where the train goes off the tracks.