Sample
https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/js-command-copy-classic-link
Author(s)
Anoop Thatti
What happened?
when trying to run the gulp build i am getting the below error
(base) vinaydeepayinapurapu@vinaydeeps-MacBook-Pro js-command-copy-classic-link % gulp build
ReferenceError: primordials is not defined
at fs.js:44:5
at req_ (/Users/vinaydeepayinapurapu/Desktop/VinayWorkingDocs/SPFx/js-command-copy-classic-link/node_modules/natives/index.js:143:24)
at Object.req [as require] (/Users/vinaydeepayinapurapu/Desktop/VinayWorkingDocs/SPFx/js-command-copy-classic-link/node_modules/natives/index.js:55:10)
at Object. (/Users/vinaydeepayinapurapu/Desktop/VinayWorkingDocs/SPFx/js-command-copy-classic-link/node_modules/gulp/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1730:14)
at Object..js (node:internal/modules/cjs/loader:1895:10)
at Module.load (node:internal/modules/cjs/loader:1465:32)
at Function._load (node:internal/modules/cjs/loader:1282:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
Steps to reproduce
- cloned the repo
- went to specific project in this case my path is /Users/vinaydeepayinapurapu/Desktop/VinayWorkingDocs/SPFx/js-command-copy-classic-link
- ran npm install
- ran gulp build. Unable to successfullly build the project.
Expected behavior
Able to serve in developer environment for instance serve.json url and able to get the classic link
Target SharePoint environment
SharePoint Online
Developer environment
None
Browsers
Node.js version
v18.20.8
Additional environment details
(base) vinaydeepayinapurapu@vinaydeeps-MacBook-Pro js-command-copy-classic-link % npm ls -g --depth=0
/Users/vinaydeepayinapurapu/.nvm/versions/node/v22.17.1/lib
├── @microsoft/generator-sharepoint@1.21.1
├── @pnp/cli-microsoft365@10.10.0
├── corepack@0.33.0
├── gulp-cli@3.1.0
├── gulp@5.0.1
├── npm@10.9.2
├── typescript@5.9.2
└── yo@5.1.0
Sample
https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/js-command-copy-classic-link
Author(s)
Anoop Thatti
What happened?
when trying to run the gulp build i am getting the below error
(base) vinaydeepayinapurapu@vinaydeeps-MacBook-Pro js-command-copy-classic-link % gulp build
ReferenceError: primordials is not defined
at fs.js:44:5
at req_ (/Users/vinaydeepayinapurapu/Desktop/VinayWorkingDocs/SPFx/js-command-copy-classic-link/node_modules/natives/index.js:143:24)
at Object.req [as require] (/Users/vinaydeepayinapurapu/Desktop/VinayWorkingDocs/SPFx/js-command-copy-classic-link/node_modules/natives/index.js:55:10)
at Object. (/Users/vinaydeepayinapurapu/Desktop/VinayWorkingDocs/SPFx/js-command-copy-classic-link/node_modules/gulp/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1730:14)
at Object..js (node:internal/modules/cjs/loader:1895:10)
at Module.load (node:internal/modules/cjs/loader:1465:32)
at Function._load (node:internal/modules/cjs/loader:1282:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
Steps to reproduce
Expected behavior
Able to serve in developer environment for instance serve.json url and able to get the classic link
Target SharePoint environment
SharePoint Online
Developer environment
None
Browsers
Node.js version
v18.20.8
Additional environment details
(base) vinaydeepayinapurapu@vinaydeeps-MacBook-Pro js-command-copy-classic-link % npm ls -g --depth=0
/Users/vinaydeepayinapurapu/.nvm/versions/node/v22.17.1/lib
├── @microsoft/generator-sharepoint@1.21.1
├── @pnp/cli-microsoft365@10.10.0
├── corepack@0.33.0
├── gulp-cli@3.1.0
├── gulp@5.0.1
├── npm@10.9.2
├── typescript@5.9.2
└── yo@5.1.0