How do I see all the warning raised by yarn during project installation again? Is there a command for that? - yarnpkg

I got a lot of unmet peer dependency errors during a project installation using yarn. And I didn't take a screenshot of those or anything. How do I see all those warning again? Is there a command for that?

The following command works while using yarn as the package manager:
yarn install --check-files

This sort of worked for me: yarn --ignore-scripts --audit.
I think it showed a few less warnings than when I ran a fresh install, but it is at least showing some of the previous warnings for me. I threw --ignore-scripts in there because in Nx/Angular repos, you might have a lengthy ngcc command set up in your package.json. --audit's main purpose is to actually show you how many vulnerabilities you have in your dependencies, but as a side-effect, it appears to be running whatever code shows the warnings. If there is a better solution, I'd also like to know.

Related

How to fix npm Error "timed out" after npm update

We have a React app, based on the Hydrogen theme for Shopify (which uses vite). It was all working ok until I had to add a package and update. It then started giving the following message: Error timed out. That is it, no other error message, I looked in the logs and there was nothing remarkable in there.
I tried removing the package, and all references to it in the code. But it looks like the issue may well have been the update command. But being rather new to React and npm on Windows, I have no idea how to fix it. Things that I did try were clearing the cache using:
npm cache clean --force
Doing another update. Removing the lock file.
Does anyone have a suggestion as to a method to debug that one-line error code, or could point me in the right direction? I am running on localhost, via Windows 10.
npm error timed out image
My problem must have been a broken dependency. After a day or so of trying updates, it eventually just started working again. The update that actually worked had some vulnerabilities, so I ran an:
npm audit fix
After the npm audit fix, the code started running correctly again.

Metasploit Framework .go module can't be loaded

This is my first post, so I might get the format wrong.. Anyway, after searching for a solution online (which I could not find), I resorted to asking here.
Upon launching my msfconsole a few days ago, I started getting all of these warnings/errors which were not showing before.
$ sudo msfconsole
[!] The following modules could not be loaded!..\
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/host_id.go
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/exchange_enum.go
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/onprem_enum.go
[!] Please see /root/.msf4/logs/framework.log for details.
metasploit v6.0.31-dev
I could not find any solution to this .go module loading issue. I might have screwed something over some time ago, but my last VM snapshot is just too far away.
Thank you all for your help!
just install go in your kali:
sudo apt install gccgo-go
I also got the same problem.
But, since the error message clearly ask me to check error log file, actually there is clear solution too.
[!] Please see /root/.msf4/logs/framework.log for details.
[09/05/2021 22:29:56] [e(0)] core: /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/onprem_enum.go failed to load - LoadError Failed to execute external Go module. Please ensure you have Go installed on your environment.
And after the Go installation, the problem is solved.
Therefore, the solutions is that you just need to install Go on your machine.

Why can't I run yarn start?

For a few days I have been getting these messages:
*> yarn run v1.21.1 $ react-scripts start
There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.
The react-scripts package provided by Create React App requires a
dependency:
"eslint": "^6.6.0"
Don't try to install it manually: your package manager does it
automatically. However, a different version of eslint was detected
higher up in the tree:
/home/sol/Repository/node_modules/eslint (version: 6.3.0)
Manually installing incompatible versions is known to cause
hard-to-debug issues.
If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact
order:
Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
Delete node_modules in your project folder.
Remove "eslint" from dependencies and/or devDependencies in the package.json file in your project folder.
Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if /home/sol/Repository/node_modules/eslint is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls eslint in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed eslint.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!
error Command failed with exit code 1. info Visit
https://yarnpkg.com/en/docs/cli/run for documentation about this
command.*
I tried everything above, but nothing helps and I'm really upset about this situation because I can't get my code to work.
Can someone help me with easy instructions because I don't have time anymore to try and find a solution to the problem.
I could not solve the problem:
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"eslint": "^6.6.0"
Don't try to install it manually: your package manager does it automatically.
However, a different version of eslint was detected higher up in the tree:
/Users/elvestrindade/node_modules/eslint (version: 6.2.2)

Yarn failing to start service based on "path/" argument must be of type string, Vue application, windows10

I am using a template, Vue cli3 application and it stopped working and I don't recall why. The error I am receiving is when I try to start the application I get this error.
yarn run serve
yarn run v1.16.0
error An unexpected error occurred: "The \"path\" argument must be of type string. Received type object".
info If you think this is a bug, please open a bug report with the information provided in "C:\\node\\TradeTriggers\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I can delete the node_modules and package.json.lock
I cannot do anything with yarn. No yarn install, yarn run serve, nothing and npm doesn't seem to want to run the application. I'm sorry there are a lot of tools to know in the JS world!
The machine is a windows10 machine and I cannot find yarn in my env variables, so the issue may lie there. I even tried installing the Yarn MSI but my version is still the one I installed through npm a while ago, still nothing.
I had problem that was caused by yarn looking at first the global settings file, ie global registry. It might be similar. On Windows, first check your yarn config path:
yarn config bin
Windows shows the path. Then in that folder, check whether you have a "rc" file, ie that is yarn configuration.
Try move this file out of the folder, for test. Have it as a copy somewhere else, where you can restore it if this does not help.
Then, once file is out, run your yarn commands again like you used to.
Sideline: on Linux, I had to remove a leftover buggy .yarnrc file in
/usr/local/share/.yarnrc
to get similar things working again. It was not a Vue app, but similar kind of error.
This error can occur when you are using Yarn Workspaces and have incompatible directories in the packages/ directory.
In my scenario, I used git subtrees to pull another repo into my project's packages/ directory. This directory had a package.json file, but it did not have compatible values for the fields required by Yarn Workspaces.
Moving the problematic package out of packages/ should fix this issue.

Yarn: How to link acorn using boltpkg - symlink error

My team has a monorepo where we are using bolt to manage dependencies and linking. I was trying to get the dev environment up and running on my local Windows machine but had issues install/link acorn. What I did was clone the repo, then $ bolt to install dependencies. As you can see, it showed error linking dependencies and complained about acorn.ps1 not being a symlink. I've done some research but none of the solutions I found, such as including --non-bin-links or running as admin, worked for me. I'd appreciate if you could provide some insights on this.
Windows: 10;
Yarn: 1.13.0;
Bolt: 0.22.6 - tried 0.22.4 as well but did not work;
Ok I found the solution to this issue.
acorn is not a dependency for my project, but it is one for yarn itself, as I searched for it and it only appears in yarn.lock. Meaning there's definitely something weird with my current version of Yarn, 1.13.0. So I downgraded it to 1.12.3 and according to the official documentation, installed bolt as a local package instead of a global one. It solved this issue.

Resources