Questions tagged [npm]
The npm tag has no usage guidance.
19
questions
3
votes
3answers
150 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
...
0
votes
0answers
17 views
@microsoft/file-browser production release and support
We have started building a custom Azure DevOps Services Extension, for our Organizations, that is using the @microsoft/file-browser API to make MS Teams/SharePoint Libraries available in the ADO Work ...
1
vote
1answer
30 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 ...
1
vote
1answer
114 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 ...
0
votes
1answer
24 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?
3
votes
3answers
4k 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 ...
1
vote
1answer
665 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 ...
0
votes
1answer
319 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-...
1
vote
1answer
96 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 ...
1
vote
0answers
114 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
1answer
220 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 ...
2
votes
0answers
33 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 ...
2
votes
1answer
4k 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 ...
1
vote
3answers
519 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
vote
5answers
10k 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:...
0
votes
2answers
502 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 ...
3
votes
0answers
145 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
2answers
6k 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/...
1
vote
1answer
106 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 ...