Please specify what version of the library you are using: [ 1.3.3 ]
Please specify what version(s) of SharePoint you are targeting: [ SPO ]
pnpjs/packages/nodejs/src/net/adalcertificatefetchclient.ts
Can not resolve NodeFetchClient
App threw an error during load
Error: Cannot find module '.'
Require stack:
- C:\***\node_modules\@pnp\nodejs\dist\nodejs.es5.umd.js
- C:\***\node_modules\electron\dist\resources\default_app.asar\main.js
-
at Module._resolveFilename (internal/modules/cjs/loader.js:659:15)
at Function.Module._resolveFilename (C:\***\node_modules\electron\dist\resources\electron.asar\common\reset-search-paths.js:43:12)
at Function.Module._load (internal/modules/cjs/loader.js:577:27)
at Module.require (internal/modules/cjs/loader.js:715:19)
at require (internal/modules/cjs/helpers.js:14:16)
at C:\***\node_modules\@pnp\nodejs\dist\nodejs.es5.umd.js:11:217
at Object.<anonymous> (C:\***\node_modules\@pnp\nodejs\dist\nodejs.es5.umd.js:14:2)
at Module._compile (internal/modules/cjs/loader.js:808:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:820:10)
at Module.load (internal/modules/cjs/loader.js:677:32)
import { NodeFetchClient } from "./nodefetchclient";
Follow Getting Started: Nodejs with latest version
I can confirm that this is problem as I have just encountered it and I tracked it down to the very same line: import { NodeFetchClient } form ".";
Faced this issue just now trying to require the SPFetchClient in Nodejs azure func.
const SPFetchClient = require("@pnp/nodejs").SPFetchClient;
Closing this as it is fixed in the merged PR #729. Will be included in 1.3.4 release.
Any chance of actually _releasing_ this bug fix?
Most helpful comment
Any chance of actually _releasing_ this bug fix?