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

SFDX 7.129.0 installed with npm does not work with node lts (16.13.0) #1300

Closed
loter opened this issue Nov 29, 2021 · 7 comments
Closed

SFDX 7.129.0 installed with npm does not work with node lts (16.13.0) #1300

loter opened this issue Nov 29, 2021 · 7 comments
Labels
investigating We're actively investigating this issue

Comments

@loter
Copy link

loter commented Nov 29, 2021

Summary

SFDX 7.129.0 installed with npm does not work with node lts (16.13.0)

Steps To Reproduce:

  1. npm install 16.13.0
  2. npm i -g [email protected]
  3. sfdx --version fails with the following errors:
sh-3.2$ sfdx --version
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'user',
  root: '/Users/dragomirenachi/.local/share/sfdx/package.json',
  name: 'sfdx-hardis',
  tag: 'latest'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(Use `node --trace-warnings ...` to show where the warning was created)
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@oclif/plugin-autocomplete'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@oclif/plugin-commands'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@oclif/plugin-warn-if-update-available'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@oclif/plugin-update'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@oclif/plugin-which'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-auth'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-custom-metadata'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-data'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-alias'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-apex'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-config'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-limits'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-org'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-source'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-schema'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-telemetry'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-trust'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-user'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/sfdx-plugin-lwc-test'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli',
  name: '@salesforce/plugin-templates'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
(node:41850) Error Plugin: sfdx-cli: could not find package.json with {
  type: 'core',
  root: '/Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli/node_modules/@salesforce/plugin-generator',
  name: '@oclif/plugin-warn-if-update-available'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-cli
root: /Users/dragomirenachi/.nvm/versions/node/v16.13.0/lib/node_modules/sfdx-cli
See more details with DEBUG=*
sfdx-cli/7.129.0 darwin-x64 node-v16.13.0

Expected result

display sfdx version

Actual result

fails

System Information

  • If you are using sfdx
    • Run sfdx version --verbose --json - fails
  • If you are using sf
    • Run sf version AND sf plugins --core
  • Paste the output here
sh-3.2$ sf version
@salesforce/cli/1.4.0 darwin-x64 node-v16.13.0
sh-3.2$ sf plugins --core
You acknowledge and agree that the CLI tool may collect usage information, user environment, and crash reports for the purposes of providing services or functions that are relevant to use of the CLI tool and product improvements.

@oclif/plugin-help 5.1.1 (core)
@oclif/plugin-not-found 2.2.0 (core)
@oclif/plugin-plugins 2.0.1 (core)
@salesforce/cli 1.4.0 (core)
config 2.2.10 (core)
deploy-retrieve 1.0.5 (core)
deploy-retrieve-metadata 1.0.7 (core)
env 1.0.3 (core)
functions 1.1.7 (core)
generate 1.0.5 (core)
login 1.0.5 (core)
telemetry 1.2.8 (core)

Additional information

bang.

@loter loter added the investigating We're actively investigating this issue label Nov 29, 2021
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@AllanOricil
Copy link

AllanOricil commented Nov 30, 2021

I'm still using node 14 because jest tests are not working with the 16. Is there a reason for upgrading to node 16, besides the doc recommending to do so?

According to this doc it's recommended to use sfdx with the "active lts" node version, which is the 16 at the moment.

@mshanemc
Copy link
Contributor

I'm still using node 14 because jest tests are not working with the 16. Is there a reason for upgrading to node 16, besides the doc recommending to do so?

According to this doc it's recommended to use sfdx with the "active lts" node version, which is the 16 at the moment.

node14 is fine

@DougMidgley
Copy link

Also facing the issue when linking a plugin :(

@AllanOricil
Copy link

@DougMidgley how are u linking a plugin? And which plugin is it?

@DougMidgley
Copy link

DougMidgley commented Aug 13, 2022

@AllanOricil Its a custom plugin (not published as is private, so its not installing, but linking) below is the the sample. Note: the plugin works perfectly fine, just with this error which causes some concern to users.

> sfdx plugins:link ../sfdx-CLIENT
›   Warning: sfdx-cli update available from 7.162.0 to 7.163.0.
Linking plugin ../sfdx-CLIENT...
sfdx-cli: linking plugin sfdx-CLIENT... done
(node:1838) Error Plugin: sfdx-CLIENT: could not find package.json with {
  type: 'dev',
  root: '/home/vsts/work/1/s/sfdx-CLIENT',
  name: '@oclif/plugin-help'
}
module: @oclif/[email protected]
task: loadPlugins
plugin: sfdx-CLIENT
root: /home/vsts/work/1/s/sfdx-CLIENT
See more details with DEBUG=*
(Use `node --trace-warnings ...` to show where the warning was created)

Interestingly, this only happens when linking on the Azure DevOps Linux machine, when doing locally with Windows, no errors show

@mshanemc
Copy link
Contributor

we've changed the code for plugins:link
oclif/plugin-plugins#517

You should see linked plugins compile themselves now, which I think was maybe at the root of some of this thread. As always, if you've got something still broken that's reproducible, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

4 participants