Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Part Missing in Toolbox After Running Gulp Serve #10053

Open
2 of 9 tasks
Sucharita993 opened this issue Dec 13, 2024 · 3 comments
Open
2 of 9 tasks

Web Part Missing in Toolbox After Running Gulp Serve #10053

Sucharita993 opened this issue Dec 13, 2024 · 3 comments
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:rolling in production The fix has been created and it's currently rolling across all production tenants type:bug-confirmed Confirmed bug, not working as designed / expected.

Comments

@Sucharita993
Copy link

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

馃挜 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 馃挜 Internet Explorer
  • 馃挜 Microsoft Edge
  • 馃挜 Google Chrome
  • 馃挜 FireFox
  • 馃挜 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • SPFx version - 1.18.2
  • Browser version - latest

Describe the bug / error

After running the gulp serve command to launch an existing SPFx project locally, the web part is not appearing in the toolbox. It was functioning perfectly until December 11th, but the issue began on December 12th.

cmd_window browser

Steps to reproduce

  1. Take a sample spfx project
  2. give gulp serve in cmd

Expected behavior

Expected the webpart to be listed under local category.

@Sucharita993 Sucharita993 added the type:bug-suspected Suspected bug (not working as designed/expected). See 鈥渢ype:bug-confirmed鈥� for confirmed bugs. label Dec 13, 2024
@Sucharita993 Sucharita993 changed the title web part not appearing in the toolbox even after running gulp serve Web Part Missing in Toolbox After Running Gulp Serve Dec 13, 2024
@Sucharita993
Copy link
Author

Sharing screenshots of DevTools console errors.

console console-2 console-3

@VesaJuvonen VesaJuvonen added area:spfx Category: SharePoint Framework (not extensions related) type:bug-confirmed Confirmed bug, not working as designed / expected. and removed type:bug-suspected Suspected bug (not working as designed/expected). See 鈥渢ype:bug-confirmed鈥� for confirmed bugs. labels Dec 13, 2024
@AJIXuMuK
Copy link
Collaborator

@Sucharita993 - thank you for reporting the issue.
We have identified the problem and will be working on the fix.

In a meanwhile, as a workaround, copy all the generated files from temp to temp/build folder.
It should unblock you while we're working on the fix

@AJIXuMuK
Copy link
Collaborator

Here is the gulptask you can add to your gulpfile.js to automatically copy the files:

// add these after const build = require('@microsoft/sp-build-web');
const fs = require('fs');
const path = require('path');

// Insert this code before build.initialize(require('gulp'));
const copyTask = build.subTask('copy-to-build', function (gulp, buildOptions, done) {
  const srcFolder = './temp';
  const destFolder = './temp/build';
  // Check if the destination folder exists, if not, create it
  if (!fs.existsSync(destFolder)) {
    fs.mkdirSync(destFolder, { recursive: true });
}

// Copy files from srcFolder to destFolder, excluding destFolder itself
return gulp.src([path.join(srcFolder, '**/*'), '!' + destFolder])
  .pipe(gulp.dest(destFolder));
});

build.rig.addPostBundleTask(copyTask);

@VesaJuvonen VesaJuvonen pinned this issue Dec 13, 2024
@VesaJuvonen VesaJuvonen added the status:rolling in production The fix has been created and it's currently rolling across all production tenants label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:rolling in production The fix has been created and it's currently rolling across all production tenants type:bug-confirmed Confirmed bug, not working as designed / expected.
Projects
None yet
Development

No branches or pull requests

3 participants