The error message you are receiving suggests that the serializedBoc variable you are passing to the oneFromBoc method is not a string. The slice method can only be called on a string, so if serializedBoc is not a string, the method will throw an error.
In particular, it's possible that the
jettonWalletCodeHex variable you are passing to the
new TonWeb.token.ft.JettonMinter() method is not a string, but instead a parsed boc. Make sure that
jettonWalletCodeHex is a string before passing it to the method.