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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples - How to use ? #1465

Open
sgalntt opened this issue Jan 12, 2025 · 1 comment
Open

Samples - How to use ? #1465

sgalntt opened this issue Jan 12, 2025 · 1 comment

Comments

@sgalntt
Copy link

sgalntt commented Jan 12, 2025

Sample

https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples

Author(s)

Stefano

Question

When I tried to use the examples, the build failed all time with many extensions.

Can you suggest me a page with updated readme or webpage or youtube video?

I'm using Node 18.20.3 version.
I run :

npm install
gulp build

ReferenceError: primordials is not defined
at fs.js:43:5
at req_ (C:\Storage\spfx\samples\react-command-copy-move-items\node_modules\natives\index.js:143:24)
at Object.req [as require] (C:\Storage\spfx\samples\react-command-copy-move-items\node_modules\natives\index.js:55:10)
at Object. (C:\Storage\spfx\samples\react-command-copy-move-items\node_modules\gulp\node_modules\graceful-fs\fs.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)

Thanks a lot

@ervingayle
Copy link
Contributor

Hello @sgalntt . The sample that you are trying to build based on the gulp build errors is react-command-copy-move-items. This component has not been updated in a while and at last build requires nodejs v10 and your running nodejs v18. Details: Link. I would not recommend simply changing the package versions in package.json but you could try this. The right way to upgrade this is to use the CLI for Microsoft365 and the SPFx Toolkit upgrade commands. You will get guidance on what needs to be updated in the project based on its current state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants