Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Error Plugin: @dxatscale/sfpowerscripts: Cannot find module 'node:process' #874

Closed
rrgripp opened this issue Mar 2, 2022 · 7 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@rrgripp
Copy link

rrgripp commented Mar 2, 2022

Describe the bug
I'm having an issue with the publish command during my pipeline, using the latest docker version.
sfdx sfpowerscripts:orchestrator:publish --npm --scope [SCOPE] --npmrcpath $CI_PROJECT_DIR/.npmrc --gittag --pushgittag
is returning:

(node:112) [MODULE_NOT_FOUND] Error Plugin: @dxatscale/sfpowerscripts: Cannot find module 'node:process'
Require stack:
- /sfdx_plugins/.local/share/sfdx/node_modules/marked-terminal/index.cjs
- /sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/lib/impl/demoreelplayer/DemoReelPlayer.js
- /sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/lib/SfpowerscriptsCommand.js
- /sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/lib/commands/sfpowerscripts/analyze/pmd.js
- /sfdx_plugins/.local/share/yarn/global/node_modules/@oclif/config/lib/plugin.js
- /sfdx_plugins/.local/share/yarn/global/node_modules/@oclif/config/lib/config.js
- /sfdx_plugins/.local/share/yarn/global/node_modules/@oclif/config/lib/index.js
- /sfdx_plugins/.local/share/yarn/global/node_modules/@oclif/command/lib/command.js
- /sfdx_plugins/.local/share/yarn/global/node_modules/@oclif/command/lib/index.js
- /sfdx_plugins/.local/share/yarn/global/node_modules/sfdx-cli/dist/cli.js
- /sfdx_plugins/.local/share/yarn/global/node_modules/sfdx-cli/bin/run
module: @oclif/config@1.18.3
task: toCached
plugin: @dxatscale/sfpowerscripts
root: /sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts
See more details with DEBUG=*

To Reproduce
run sfdx sfpowerscripts:orchestrator:publish --npm --scope [SCOPE] --npmrcpath $CI_PROJECT_DIR/.npmrc --gittag --pushgittag

Expected behavior
The built package should be uploaded to our NPM registry. Expected output is something like:

-------------------------------------------------------------------------------------------
sfpowerscripts  -- The DX@Scale CI/CD Orchestrator -Version:10.2.7 -Release:December 21
-------------------------------------------------------------------------------------------
command: publish
target: NPM
Publish promoted artifacts only: false
-------------------------------------------------------------------------------------------
Publishing [package] Version [version] with tag main...
Creating Git Tags in Repo
Pushing Git Tags to Repo
----------------------------------------------------------------------------------------------------
1 artifacts published in 00:00:02 with {0} errors
----------------------------------------------------------------------------------------------------

Platform Details (please complete the following information):
gitlab-runner 13.11.0

@github-actions github-actions bot added the analysis To be decided on how to solution/fix label Mar 2, 2022
@azlam-abdulsalam
Copy link
Contributor

Is this a custom docker image? I just ran a test again with the latest image, and everything looks fine

https://github.com/azlam-abdulsalam/test/runs/5398834927?check_suite_focus=true

@rrgripp
Copy link
Author

rrgripp commented Mar 2, 2022

No, we use the dockerhub image:
image

I'm running it locally now, to see if it could be something related to the gitlab-runner.
Also tried running in Gitlab with December-21 and worked fine...

@azlam-abdulsalam
Copy link
Contributor

@rrgripp Any luck in investigations? We are unable to reproduce this

@rrgripp
Copy link
Author

rrgripp commented Mar 7, 2022

No luck so far. I opted to use release-dec21 version and will try again the latest version later. I'll keep you guys posted with any updates...

@azlam-abdulsalam azlam-abdulsalam added bug Something isn't working and removed analysis To be decided on how to solution/fix labels Mar 16, 2022
@dieffrei
Copy link
Contributor

The CLI needs node version >= 14.19

To update your node or use multiple versions you can use "n"
Follow these steps:

  1. npm install -g n
  2. n 14.19.0
  3. node -v

More info here:
https://stackoverflow.com/questions/71345449/node-error-cannot-find-module-nodeprocess-when-using-global-fastify-cli-m
https://stackoverflow.com/questions/47008159/how-to-downgrade-node-version

@azlam-abdulsalam
Copy link
Contributor

Fixed in alpha

@AnjuGahlyan
Copy link

Hi Azlam,
While running every command getting below error, Can you please help here:-
Error Plugin: @dxatscale/sfpowerscripts: Cannot find module 'node:process'
Require stack:

  • C:\Users\GahlyanA\AppData\Local\sfdx\node_modules\marked-terminal\index.cjs
  • C:\Users\GahlyanA\AppData\Local\sfdx\node_modules@dxatscale\sfpowerscripts\lib\impl\demoreelplayer\DemoReelPlayer.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\node_modules@dxatscale\sfpowerscripts\lib\SfpowerscriptsCommand.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\node_modules@dxatscale\sfpowerscripts\lib\PackageCreateCommand.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\node_modules@dxatscale\sfpowerscripts\lib\commands\sfpowerscripts\package\source\create.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules@oclif\config\lib\plugin.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules@oclif\config\lib\config.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules@oclif\config\lib\index.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules@oclif\command\lib\command.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\client\7.117.0-b5a8ac9\node_modules@oclif\command\lib\index.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\client\7.117.0-b5a8ac9\dist\cli.js
  • C:\Users\GahlyanA\AppData\Local\sfdx\client\7.117.0-b5a8ac9\bin\run
    module: @oclif/config@1.17.0
    task: toCached
    plugin: @dxatscale/sfpowerscripts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants