0

My organization is starting to really get into SharePoint development and I'm currently working on several projects related to SharePoint.

I've really been getting into the SharePoint Framework Development and the PnP program. I've gone thru several of the SharePoint Framework tutorials and have successfully created several web parts and deployed them to my M365 Dev environment.

There are some samples though on the PnP Sample page that I would like to try to setup in my environment but I am having issues with the npm install command. I've tried it on some of the sample and tutorials, but it is constantly failing (even on the ones in the tutorial folder).

I've gone thru and used nvm to install the different node.js versions associated with the samples but it is always failing no matter the node.js version.

I was hoping to get some guidance on how to work around this issue.

Update: Here are some of the error messages I am getting.

This morning when I try to use npm install I get this error: npm ERR! nested aliases not supported

Here is a copy of the attempts I tried last night:

44396 warn notsup Unsupported engine for [email protected]: wanted: {"node":"0.10 || 0.12 || 4 || 5"} (current: {"node":"14.20.0","npm":"6.14.17"}) 44397 warn notsup Not compatible with your version of node/npm: [email protected] 44398 verbose notsup Not compatible with your version of node/npm: [email protected] 44398 verbose notsup Required: {"node":"0.10 || 0.12 || 4 || 5"} 44398 verbose notsup Actual: {"npm":"6.14.17","node":"14.20.0"} 44399 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): 44400 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 44401 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin 44401 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any 44401 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32 44401 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64 44402 warn notsup Unsupported engine for [email protected]: wanted: {"node":">=0.10.0 <7"} (current: {"node":"14.20.0","npm":"6.14.17"}) 44403 warn notsup Not compatible with your version of node/npm: [email protected] 44404 verbose notsup Not compatible with your version of node/npm: [email protected] 44404 verbose notsup Required: {"node":">=0.10.0 <7"} 44404 verbose notsup Actual: {"npm":"6.14.17","node":"14.20.0"} 44405 verbose stack Error: [email protected] postinstall: node scripts/build.js 44405 verbose stack Exit status 1 44405 verbose stack at EventEmitter. (C:\Users\johne\AppData\Roaming\nvm\v14.20.0\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 44405 verbose stack at EventEmitter.emit (events.js:400:28) 44405 verbose stack at ChildProcess. (C:\Users\johne\AppData\Roaming\nvm\v14.20.0\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 44405 verbose stack at ChildProcess.emit (events.js:400:28) 44405 verbose stack at maybeClose (internal/child_process.js:1088:16) 44405 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5) 44406 verbose pkgid [email protected] 44407 verbose cwd G:\YoProjects\SharePoint\sp-dev-fx-webparts\tutorials\tutorial-getting-started\jquery-webpart 44408 verbose Windows_NT 10.0.22000 44409 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i" 44410 verbose node v14.20.0 44411 verbose npm v6.14.17 44412 error code ELIFECYCLE 44413 error errno 1 44414 error [email protected] postinstall: node scripts/build.js 44414 error Exit status 1 44415 error Failed at the [email protected] postinstall script. 44415 error This is probably not a problem with npm. There is likely additional logging output above. 44416 verbose exit [ 1, true ]

8
  • What is the error message? Try to use same SPFx/Node.js/npm/yo/gulp versions as of the sample given in PnP repository. Also, check compatibility matrix for SPFx. Commented Aug 24, 2022 at 4:07
  • Please share the error message Commented Aug 24, 2022 at 5:38
  • To help you better, can you share more information and the error message on this issue?
    – Zella_msft
    Commented Aug 24, 2022 at 8:09
  • I updated the post with some of the error messages.
    – johnsoep
    Commented Aug 24, 2022 at 13:01
  • @GaneshSanap Thanks for that matrix, that does help a lot!
    – johnsoep
    Commented Aug 24, 2022 at 13:48

1 Answer 1

0

I was able to get it up and running. Figuring out the items that I needed to install/set for compatibility was fun. For the 'lint' error I had to download and install eslint (https://github.com/typescript-eslint/typescript-eslint) and run it while I bundled and packaged the solution. Thanks all for your help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.