s-KaiNet / spfx-fast-serve

Improve your SharePoint Framework development flow by speeding up the "serve" command :rocket:
MIT License
138 stars 11 forks source link

When I run my code with npm run serve I get the following error #153

Closed uliseslopez0 closed 1 month ago

uliseslopez0 commented 1 month ago

I run normally for the first time after installing the package in question and this is the error

[fast-serve] Cannot read properties of null (reading 'plugins')

Node version: 18 SPFx version: 1.19 spfx-fast-serve-helpers: 1.20.2 or 1.19.2

s-KaiNet commented 1 month ago

Do you have stack trace in console?

uliseslopez0 commented 1 month ago

Yes,

[09:31:15] [fast-serve] Cannot read properties of null (reading 'plugins') /home/testpc/reposnew/testSP/node_modules/spfx-fast-serve-helpers/lib/common/helpers.js:256 for (const plugin of originalWebpackConfig.plugins) { ^

TypeError: Cannot read properties of null (reading 'plugins') at getExternalComponents (/home/testpc/reposnew/testSP/node_modules/spfx-fast-serve-helpers/lib/common/helpers.js:256:48) at createBaseConfig (/home/testpc/reposnew/testSP/node_modules/spfx-fast-serve-helpers/lib/webpack/baseConfig.js:67:68) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async createConfig (/home/testpc/reposnew/testSP/node_modules/spfx-fast-serve-helpers/lib/webpack/configureWebPack.js:43:24) at async resultConfig (/home/testpc/reposnew/testSP/node_modules/spfx-fast-serve-helpers/lib/webpack/configureWebPack.js:93:28) at async startDevServer (/home/testpc/reposnew/testSP/node_modules/spfx-fast-serve-helpers/lib/webpack/devServer.js:19:24)

Node.js v18.20.4 [09:31:15] [fast-serve] The process terminated unexpectedly

uliseslopez0 commented 1 month ago

Update:

Thanks @s-KaiNet for your help. I solved the problem by including spfx-fast-serve-helpers in my gulpfile.js

Thanks a lot for your help.