0

Should I need to do a npm install for SPFX if I have already done a global install of all the modules required by SPFX?

Restoring modules is very slow, and I'd really like to avoid doing it if necessary.

2 Answers 2

1

To get started coding faster you can start yeoman like this in CMD:

yo @microsoft/sharepoint --skip-install

Open project in preferred IDE, for example VS Code and start coding with:

code .

Start npm install in background with:

npm install

Continue coding in your IDE while npm installs in the background!

Sign up to request clarification or add additional context in comments.

1 Comment

skip-install is a flag i didnt know about
0

I do not recommend to install all spfx packages global. Each project can use different versions of packages. And for each project there is separate node modules folder used to build and package solution. Maybe there is a way to point build and package from globally installed packages but as i wrote there could be huge differences between versions ... just run npm i and take a coffee 😉

2 Comments

"just run npm i and take a coffee" - not a fan of waiting :-)
Me neither ... I had problems with slow installation due to proxy and slow disk. Proxy is still here, major problem is after running yo i have to wait around 1-2 minutes to start ... I thought that after changing hard drive to SSD the performance would increase significantly, but no ... so after i run npm i, i start to changing code (config, strings, etc.), installation is in progress on background so it does not bother me much.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.