sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

gulp error : Error: Cannot find module '@microsoft/sp-build-web'

Open ShlokChakankar opened this issue 10 years ago • 11 comments

E:\myfolder>gulp serve module.js:327 throw err; ^

Error: Cannot find module '@microsoft/sp-build-web' at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. (E:\shlok\helloworld-webpart\gulpfile.js:4:15) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17)

ShlokChakankar avatar Aug 18 '16 07:08 ShlokChakankar

Same here

ssandu avatar Aug 19 '16 13:08 ssandu

Can you test running the following. Looks like there several similar issues with packages not loading properly.

npm install

wictorwilen avatar Aug 19 '16 13:08 wictorwilen

There are a few things missing if you don't have python installed correctly - you will probably find error messages if you scroll far enough back but you can easily miss them. Having got to this stage it may be easier to fix the missing dependencies:

npm install --save-dev @microsoft/sp-build-web

Failing that, make sure you have everything mentioned under "Set up your machine", delete the old helloworld-webpart folder and then create a new one and use Yeoman to re-create everything.

SPDoctor avatar Aug 19 '16 17:08 SPDoctor

Thanks @SPDoctor. I have installed Python and again tried to run the package using YO. It worked perfectly.

ShlokChakankar avatar Aug 19 '16 17:08 ShlokChakankar

same here on ubuntu

mauricionr avatar Aug 23 '16 01:08 mauricionr

Hi

Have you tried the following :- npm -g install npm@next npm install --global --production windows-build-tools

then try your command again. Regards

Nigel

NPrice99 avatar Aug 25 '16 22:08 NPrice99

I have got the same error while running the gulp trust-dev-cert Run the command npm install --save-dev

Solved the issue. That's @ SPDoctor.

pvnbharath avatar Jul 27 '17 05:07 pvnbharath

Running this command solved the issue for me! npm i

prabhu244 avatar Oct 13 '18 16:10 prabhu244

I have installed python but still recieving error after running npm i

DanSantoDomingo avatar Jan 18 '19 07:01 DanSantoDomingo

Hi, We will get this error when the module 'sp-build-web' is missing in "node_modules/@microsoft" folder install sp-build-web module to resolve this issue command to install : npm install @microsoft/sp-build-web

SP-Bulid-Web

Also for SPFX make sure that your node js version is >=8.9.4 <9.0.0 || >=10.13.0 <11.0.0

PrasantiKintali avatar Sep 11 '19 10:09 PrasantiKintali

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 30 '20 12:01 msft-github-bot