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

react-organization-chart - MODULE_NOT_FOUND error #4501

Closed
9 tasks
rspartas opened this issue Dec 19, 2023 · 3 comments
Closed
9 tasks

react-organization-chart - MODULE_NOT_FOUND error #4501

rspartas opened this issue Dec 19, 2023 · 3 comments
Labels
status:node-compatibility type:bug-suspected Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs

Comments

@rspartas
Copy link

Disclaimer

Yes

Sample

react-organization-chart

Contributor(s)

@joaojmendes

What happened?

Keep receiving the following error message when trying to install using node v8, v10 and v18:

{ Error: Cannot find module 'node:path'
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.149411 (C:\Users\user\Downloads\sp-dev-fx-webparts-main\sp-dev-fx-webparts-main\samples\react-organization-chart\node_modules@microsoft\rush-lib\dist\rush-lib.js:461:18)
at webpack_require (C:\Users\user\Downloads\sp-dev-fx-webparts-main\sp-dev-fx-webparts-main\samples\react-organization-chart\node_modules@microsoft\rush-lib\dist\rush-lib.js:562:41)
at Object.74151 (C:\Users\user\Downloads\sp-dev-fx-webparts-main\sp-dev-fx-webparts-main\samples\react-organization-chart\node_modules@microsoft\rush-lib\dist\commons.js:18203:67)
at webpack_require (C:\Users\user\Downloads\sp-dev-fx-webparts-main\sp-dev-fx-webparts-main\samples\react-organization-chart\node_modules@microsoft\rush-lib\dist\rush-lib.js:562:41)
at Object.62165 (C:\Users\user\Downloads\sp-dev-fx-webparts-main\sp-dev-fx-webparts-main\samples\react-organization-chart\node_modules@microsoft\rush-lib\dist\commons.js:10485:93)
at webpack_require (C:\Users\user\Downloads\sp-dev-fx-webparts-main\sp-dev-fx-webparts-main\samples\react-organization-chart\node_modules@microsoft\rush-lib\dist\rush-lib.js:562:41) code: 'MODULE_NOT_FOUND' }

Steps to reproduce

  1. npm install
  2. npm install -g gulp
  3. gulp build

Expected behavior

Trying to create a sppkg file to upload to SharePoint

Target SharePoint environment

SharePoint Online

Developer environment

None

Browsers

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

What version of Node.js is currently installed on your workstation?

v10.24.1

What version of Node.js is required by the sample?

v10.24.1

Paste the results of SPFx doctor

C:\Users\user\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

No response

@rspartas rspartas added the type:bug-suspected Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs label Dec 19, 2023
@ghost
Copy link

ghost commented Dec 19, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Copy link

Thank you for your issue. It looks like the web part sample you're trying to use is not compatible with the version of Node.js that you're running in your environment.

You should refer to the troubleshooting instructons before opening an issue to make sure that you have eliminated the most common causes.

We'll close this issue, but if you run into further issues after you have made changes to your environment and followed the troubreshooting steps, please do not hesitate to open a new issue so we can help you further.

@rspartas
Copy link
Author

I also receive an error when I use the recommended version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:node-compatibility type:bug-suspected Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs
Projects
None yet
Development

No branches or pull requests

2 participants