Please specify what version of the library you are using: [
"@pnp/common": "^2.0.12",
"@pnp/logging": "^2.0.12",
"@pnp/odata": "^2.0.12",
"@pnp/sp": "^2.0.12",
"@pnp/graph": "^2.0.12",
"@pnp/sp-clientsvc": "^1.3.11",
"@pnp/sp-taxonomy": "^1.3.11",
]
Please specify what version(s) of SharePoint you are targeting: [ Online ]
Web part works with no error messages
web part provides the following error: Object prototype may only be an Object or null: undefined error
please elaborate what the dependencies and their versions are for @pnp/sp-taxonomy
public getUserCompanyTerm(company: string): Promise<IPickerTerm> {
return new Promise<IPickerTerm>(async (resolve, reject) => {
try {
let store = await this.session.termStores.getByName(Constants.TAX_STORE_NAME).get();
let termSet = store.getTermSetById(Constants.OPCO_TERMSET_ID);
let termSetData = await termSet.get();
let opCoTerm = await termSet.terms.getByName(company).get();
if (opCoTerm) {
resolve({ name: company, key: opCoTerm.Id, path: opCoTerm.PathOfTerm, termSet: termSetData.Id });
}
resolve(null);
} catch (error) {
reject(error);
}
});
}
The first thing I notice just in reviewing your submission is that you're trying to mix versions of the library and that doesn't work. You either need to be all in v1 or all in v2. We have some Taxonomy support in v2 now although it's beta and seemingly ever changing it may work for your needs. More documentation on v2 Taxonomy can be found here.

Downgrading @pnp/sp to 1.3.11 broke the rest of the solution. sp-taxonomy v2 might be the answer but its in beta. 螚慰w can i obtain beta? I cant see a v2.0 on npm
Also, link doesnt work in firefox
So v2 install is different than v1, you may want to review the docs on transitioning here. Long story short the taxonomy endpoints are just available in v2 but are hitting SharePoint APIs that are in beta... We've had to make fixes and updates in every release since they came out, so I'm implying to you that we have no control over those changes and therefore until they say their GA you may find that your requests will break.
All i am trying to do is find the termset under a term that matches the given company. Then i want to pass it on as a IPickerTerm to TaxonomyPicker as initial value. However, I dont think its possible to fetch the termset path with the current API.
Nope.. you're right.
Most helpful comment
The first thing I notice just in reviewing your submission is that you're trying to mix versions of the library and that doesn't work. You either need to be all in v1 or all in v2. We have some Taxonomy support in v2 now although it's beta and seemingly ever changing it may work for your needs. More documentation on v2 Taxonomy can be found here.