Questions tagged [npm]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

Cannot find module '@microsoft/sp-application-base' or its corresponding type declarations

I am working on spfx webpart and getting below error when trying to run my solution Cannot find module '@microsoft/sp-application-base' or its corresponding type declarations then i tried installing ...
  • 45
0 votes
1 answer
60 views

PnP SharePoint Framework npm install issues

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 ...
0 votes
1 answer
222 views

"gulp serve --nobrowser" is raising this error "Task never defined: serve"

I am trying to run this command for my SPFx gulp serve --nobrowser,, but i am getting this error:- C:\Windows\System32>d: D:\>cd D:\Systems D:\Systems>gulp serve --nobrowser [13:23:37] ...
  • 802
0 votes
0 answers
717 views

NPM version is not known to run on Node.js v10.15.1

I want to set-up the SPFx environment with the Node.js v10.15.1 and npm v6.4.1 so, I installed Node.js v10.15.1. But when I tried to check the npm version, it is showing the below error. How can I ...
  • 1,350
0 votes
1 answer
26 views

Problem with library node SPFx

I have trouble downloading npm install @pnp/spfx-controls-react, has anyone happened to it? It shows me the following error, I have removed and installed node again, but the problem persists
  • 101
0 votes
1 answer
146 views

npm install command error

Sample:(PS: You can find what I tested in the GitHub link below) https://github.com/pnp/sp-dev-fx-webparts/blob/master/samples/react-mgtEvents/src/webparts/mgtEvents/MgtEventsWebPart.ts Problem: Hello,...
0 votes
1 answer
2k views

gulp build is raising this Error - [tslint] Error: Cannot find module '@microsoft/rush-stack-compiler-3.2'

I want to install this web part from hhttps://github.com/AsishP/SPFxWebParts , but when i run this command gulp build i got this error Error - [tslint] Error: Cannot find module '@microsoft/rush-stack-...
  • 802
0 votes
2 answers
7k views

npm install outputs an error: npm ERR! Cannot read property 'pickAlgorithm' of null

As instructed within the Setting up your development environment guidance material. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment I've installed yeoman: npm ...
3 votes
3 answers
431 views

Share "node_modules" folder between webparts

Here is my scenario: I have 7 different webparts In order to have more control over the projects, I have split them in different projects All of the projects were created using the Yeoman installer ...
  • 187
1 vote
1 answer
111 views

SPFx Yeoman generates wrong package versions

In the past I have generated SPFx projects successfully using @microsoft/generator-sharepoint yeoman generator, but now it is not giving me the same versions for the SPFx packages. I discovered it was ...
  • 33
1 vote
1 answer
342 views

SPFx development - npm audit vulnerabilities

The company I work for needs custom web parts in modern SharePoint. I was humming along following the excellent (Microsoft's sponsored) tutorials on SPFx development. I got my web part working on my ...
  • 13
0 votes
1 answer
25 views

The 'npm outdated -g' current is not the same as my 'npm -v' [closed]

My npm -v is 6.13.4 but my current in npm outdated -g is 6.11.3. How would I remedy that issue?
4 votes
4 answers
9k views

Property 'web' does not exist on type 'SPRest'

I installed these packages: @pnp/logging @pnp/common @pnp/odata @pnp/sp npm i @pnp/logging @pnp/common @pnp/odata @pnp/sp --save and tried this: import { sp } from '@pnp/sp'; public ...
  • 164
1 vote
1 answer
2k views

How to fix error cannot find module @microsoft/sp-build-web.When trying the sp-dev-ebpart samples

I have been trying to build the https://github.com/SharePoint/sp-dev-fx-webparts I have gone through the instructions and reinstalled and installed but no luck I am now getting the error: Cannot ...
  • 4,144
0 votes
1 answer
547 views

How to setup the environment for the sample sp-dev-fx-webparts - client-side web part samples

I have installed git and cloned the below https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples Installed node and NPM for windows.Ran npm install for just one specific folder (react-...
  • 4,144
1 vote
1 answer
180 views

Got the error in SPFx installation "Yeoman Doctor - Running sanity checks on your system"

Hi All, When I tried to installed the SPFx "npm install -g yo" getting the issues. Tried both "npm install -g yo@latest" and "npm rm -g yo", "npm install -g yo" but it didn't help. Attached the ...
2 votes
0 answers
160 views

Excessive Vulnerability Count in Yeoman SharePoint Generator

When I run yo @microsoft/sharepoint and pick standard options for a SharePoint Online WebPart with No JavaScript framework, NPM shows 1956 vulnerabilities with 140 of them being high priority. I ...
4 votes
1 answer
299 views

Sharepoint framework (spfx) failes to create new project

I use yo @microsoft/sharepoint and it hangs at `Found npm version 6.5.0,no error the console is not closing it just stops. (files are not produced and multiple enters don't do anything) Guys do you ...
  • 261
2 votes
0 answers
38 views

Working with npm packages in SharePoint hosted app

I am starting to work on a SP 2013 hosted app. I am planning to use typescript and have setup my project with Typescript configurations enabled. I have created a SP module called "dist" and all ...
  • 8,789
2 votes
1 answer
5k views

Updating SPFX breaks gulp

So i tried installing a webpart from scratch & added React as a framework. All good, but the version of @microsoft dependencies is 1.5.1 AND the latest is actually 1.6.0. I've tried updating ...
  • 569
1 vote
3 answers
768 views

ts Cannot find the module

I am very new to the SPFx I just started. I was making my first web part in Visual Studio Code but I was having some difficulty in my code. May be somebody can help. I have scss module in the same ...
  • 1,518
1 vote
5 answers
15k views

Local gulp not found when executing gulp serve

I have downloaded the spfx samples from github and I am running into this problem when I execute gulp serve. λ gulp serve [12:39:37] Local gulp not found in C:\react-todo-basic [12:39:37] Try running:...
  • 1,318
0 votes
2 answers
558 views

SharePoint 2016 On Premise Dev using SharePoint Framework

This is my first question in this forum ;) I need to develop SharePoint 2016 On Premises solution in Visual Studio using the SharePoint Framework. i did some RnD over it and found a nice articles on ...
4 votes
0 answers
160 views

Use npm to reuse react components between web parts

I've been building web parts for a while now and I've found myself copy-pasting some of my spfx react components more often than I'd like. The ideal solution for me here would be to publish the ...
3 votes
2 answers
7k views

pnp.sp.site.getWebUrlFromPageUrl method is returning wrong web URL

I am using sp-pnp-js for my spfx project. GetWebUrlFromPageUrl method is returning wrong URL that includes sitePages also. Please refer: my current page location is https://xxxx.sharepoint.com/sites/...
  • 2,317
1 vote
1 answer
120 views

Issue setting up spfx project

I am not able to generate a yo project using @microsoft/generator-sharepoint. The menu simply freezes at the following step - which type of client-side component to create? arrows key don't work ...