0

I am trying to do a sample webpart.

While running any of the below commands, it is showing the same error as shown in the image:

  • gulp trust-dev-cert
  • gulp serve
  • gulp build

enter image description here

Can anyone help me on this error?

0

Your probably have your project in a folder beneath it and your current directory D:\SPFXWebpart does not contain a gulpfile.

So CD into that folder and try to run your gulp task.

0

enter image description here

Above are the project files in the image. And I have gulpfile.js in same Directory[D/SPFXWebpart] and I ran the gulp command under the same directory.

Any suggestions where I am doing wrong?

0

Reinstalling gulp-cli worked for me:

npm install -g gulp-cli

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.