react-display-hierarchy issue with workers thread #5116
Labels
sample: react-display-hierarchy
type:bug-suspected
Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs
Disclaimer
Yes
Sample
samples/react-display-hierarchy
Contributor(s)
@nanddeepn @ravi16a87
What happened?
Facing the below error on giving gulp bundle --ship
Error: Cannot find module 'worker_threads'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Users\blues\Downloads\react-display-hierarchy\node_modules@rushstack\worker-pool\lib\WorkerPool.js:6:26)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3) code: 'MODULE_NOT_FOUND'
Steps to reproduce
clone the repo
execute the command - npm i
execute the command - gulp bundle --ship
Expected behavior
The build should be successful and the package has to be published upon
executing gulp package-solution --ship
Target SharePoint environment
SharePoint Online
Developer environment
Windows
Browsers
What version of Node.js is currently installed on your workstation?
v 10.24
What version of Node.js is required by the sample?
v 10
Paste the results of SPFx doctor
AppData\Roaming\npm\node_modules@pnp\cli-microsoft365\dist\index.js:2
import { cli } from './cli/cli.js'; ^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3
Additional environment details
Tried with gulp v3.9, v4.0 and we are facing the issue.
The text was updated successfully, but these errors were encountered: