Closed robsonos closed 1 month ago
Hey @robsonos , do you have yarn installed and what version are you using?
Also, if you run yarn info --json
does it work on your terminal?
Also, if you try yarn outdated --format=json
does it work?
Hi @dtarnawsky,
I just upgraded to Ionic extension v1.85.2
and the problem persists.
Here are some more details about my environment:
1.22.22
v20.12.2
10.5.0
Sonoma 14.4.1
nvm
. It is properly configured. Both native and VSCode's terminal work, and I forced "ionic.shellPath": "/bin/zsh"
just in case.Digging a bit more into the issue I found:
yarn info --json
from VSCode's and native terminal returns:
{"type":"error","data":"Received invalid response from npm."}
npm info
returns:
npm info
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/MY-REPO - Not found
npm ERR! 404
npm ERR! 404 'MY-REPO@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in: /Users/MY-USER/.npm/_logs/2024-04-22T01_28_50_450Z-debug-0.log
My understanding for this one is that npm info
(an alias for npm view
) without any arguments is looking into my repo in npm's registry, which does not exist. Not sure what the intention was with npm info
here.
yarn outdated --format=json
from VSCode's and native terminal returns:
yarn outdated v1.22.22
info Color legend :
"<red>" : Major Update backward-incompatible updates
"<yellow>" : Minor Update backward-compatible features
"<green>" : Patch Update backward-compatible bug fixes
Package Current Wanted Latest Package Type URL
eslint 8.57.0 8.57.0 9.1.0 devDependencies https://eslint.org
✨ Done in 7.62s.
That is not outputting a JSON as you guys may have intended. Perhaps you guys meant to use yarn outdated --json
?
Cheers.
Hey @robsonos , could you try this out for me: in your package.json
add the line:
"packageManager": "yarn@1.0.0"
This should change the command yarn outdated --format=json
(which is used with > v1 yarn) to yarn outdated --json
.
I'm not sure where you have MY-REPO
in your package.json but you'll need to remove that in order to get yarn info --json
to work.
Also, as a generate note, it is probably worth moving away from Yarn v1.
Hi @dtarnawsky,
The two previously mentioned errors are gone after adding "packageManager": "yarn@1.0.0"
to package.json
. However, now:
[Ionic] Detected nvm (20) for this project.
> yarn list --json
[error] TypeError: Cannot read properties of undefined (reading 'lastIndexOf')
That one does seem to output properly from the terminal:
% yarn list --json
{"type":"activityStart","data":{"id":0}}
{"type":"activityTick","data":{"id":0,"name":"@angular/animations@^17.0.0"}}
{"type":"activityTick","data":{"id":0,"name":"tslib@^2.3.0"}}
{"type":"activityTick","data":{"id":0,"name":"@angular/common@
...
I used MY-REPO
instead of the real name for privacy reasons. Sorry for the confusion.
Also, thanks for the tip regarding Yarn v1.
Cheers
Hi @robsonos , this issue should now be resolved.
Here is the output from the extension:
I am using
v1.85.1