Questions tagged [npm]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 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 ...
user avatar
  • 1,342
0 votes
1 answer
19 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
user avatar
  • 101
0 votes
1 answer
55 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,...
user avatar
0 votes
1 answer
524 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-...
user avatar
  • 2,224
0 votes
2 answers
4k 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 ...
user avatar
3 votes
3 answers
385 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 ...
user avatar
  • 187
1 vote
1 answer
91 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 ...
user avatar
  • 33
1 vote
1 answer
282 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 ...
user avatar
  • 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?
user avatar
4 votes
4 answers
7k 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 ...
user avatar
  • 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 ...
user avatar
  • 4,080
0 votes
1 answer
509 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-...
user avatar
  • 4,080
1 vote
1 answer
156 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 ...
user avatar
2 votes
0 answers
149 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 ...
user avatar
4 votes
1 answer
277 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 ...
user avatar
  • 261
2 votes
0 answers
37 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 ...
user avatar
  • 8,769
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 ...
user avatar
  • 569
1 vote
3 answers
691 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 ...
user avatar
  • 1,519
1 vote
5 answers
14k 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:...
user avatar
  • 1,316
0 votes
2 answers
549 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 ...
user avatar
4 votes
0 answers
156 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 ...
user avatar
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/...
user avatar
  • 2,317
1 vote
1 answer
114 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 ...
user avatar