warning Lockfile has incorrect entry for "prismjs#1.24.0". Ignoring it - github

I have inherited an issue with prismjs whereby I have to remove/reinstall it every time I add/upgrade another package.
I have a gocd pipeline validation that fails every time I try to use dependabot to address security vulnerabilities on my repo.
Goes something like this....
dependabot generates pull request
validation fails with error "warning Lockfile has incorrect entry for "prismjs#1.24.0". Ignoring it"
Pull down master branch > upgrade package manually > remove/install prismjs#1.24.0
Generate new PR > validation succeeds and everything works fine.
Merge with master
rinse and repeat.
What I am seeing is that I have 2 entries in my yarn.lock for prismjs and removing it only removes the 1.24.0 entry AND, if I leave 1.24.0 removed the validation still fails because it cant find prismjs 1.24.0.
prismjs#1.24.0:
version "1.24.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.24.0.tgz#0409c30068a6c52c89ef7f1089b3ca4de56be2ac"
integrity sha512-SqV5GRsNqnzCL8k5dfAjCNhUrF3pR0A9lTDSCUZeh/LIshheXJEaP0hwLz2t4XHivd2J/v2HR+gRnigzeKe3cQ==
prismjs#^1.23.0, prismjs#^1.8.4, prismjs#~1.17.0:
version "1.26.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.26.0.tgz#16881b594828bb6b45296083a8cbab46b0accd47"
integrity sha512-HUoH9C5Z3jKkl3UunCyiD5jwk0+Hz0fIgQ2nbwU2Oo/ceuTAQAg+pPVnfdt2TJWRVLcxKh9iuoYDUSc8clb5UQ==
package.json:
"dependencies": {
"comma-separated-tokens": "^1.0.0",
"elliptic": "^6.0.0",
"handlebars": "^4.1.2",
"http-proxy": "^1.17.0",
"https-proxy-agent": "^2.2.1",
"immer": "9.0.6",
"ini": "^1.3.5",
"lodash": "^4.5.1",
"markdown-to-jsx": "^6.9.1",
"merge-deep": "^3.0.2",
"nested-object-assign": "1.0.4",
"parse-headers": "^2.0.0",
"prismjs": "1.24.0",
"space-separated-tokens": "^1.0.0",
"ssri": "^6.0.1",
"tar": "4.4.19",
"tree-kill": "^1.1.0",
"ua-parser-js": "^0.7.9",
"url-parse": "^1.4.3",
"websocket-extensions": ">=0.1.1",
"y18n": "^4.0.0",
"yargs-parser": "^13.1.1"
},
"resolutions": {
"prismjs": "^1.23.0",
"property-expr": "^2.0.3"
I'm relatively new to how this versioning works and like I say I inherited this issue so I don't really have a history besides what I can see in github.
Any help would be greatly appreciated.

By Running yarn why prismjs that will explain which packages other than your project depend on prismjs.
I'm not sure if you've other packages that depend on prismjs to explain these other entries. It seems that some of the dependencies are hoisted to me. If you've a monorepo setup or work with nested packages, that could explain it.
Maybe helpful info as well, according to Yarn docs
You will receive a warning if your resolution version or range is not compatible with the original version range.
Nested packages may not work properly.

Related

RN 0.56 throws error 'React/RCTBridgeModule.h' file not found

Long story short, I got very very old RN IOS project (dependency list can show you how old) which works on only one company macbook. Thing is that this macbook has already some problems and I wished to install everything on my current mac, Unfortunately it throws many errors and I don't really know what to do with them. Project works on previous mac with XCode 12.5, I installed same version here just to make sure, also node v8.17.0 is used in previous mac so I used nvm to get same version.
Package.json
dependencies": {
"react": "^16.4.1",
"react-dom": "^16.4.2",
"react-native": "0.56",
"react-native-axios": "^0.17.1",
"react-native-barcode-builder": "^1.0.5",
"react-native-ble-manager": "^6.5.1",
"react-native-bluetooth-status": "^1.3.0",
"react-native-canvas": "^0.1.23",
"react-native-color-matrix-image-filters": "^5.2.0",
"react-native-cookies": "^3.3.0",
"react-native-linear-gradient": "^2.4.2",
"react-native-pulse": "^1.0.6",
"react-native-restart": "0.0.7",
"react-native-safari-view": "^2.1.0",
"react-native-side-menu": "^1.1.3",
"react-native-splash-screen": "^3.1.1",
"react-native-vector-icons": "^5.0.0"
},
So i go clone, np install and then npx react-native start, try to launch it in XCode and then build fails with:
'React/RCTBridgeModule.h' file not found in several libraries. As far as I can see in "Build Phases" > "Link binary with Libraries" they are there
EDIT
Ok I tried to take approach signed as a answer from link in comments, it went a bit further but now it crash on:
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/vlog_is_on.cc'
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/utilities.cc'
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/logging.cc'
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/symbolize.cc'
I managed to make it works! Thanks for comment it really helped me to move first step which was the hardest, so basically what I had to do, maybe it will be useful for someone who tries to launch some old project:
In XCode goes to Build Phases, manually unlink all external libraries and then re-add them again
Move React.xcodeproj from libraries to root folder and then in Build Phases => dependency > add React
Goes with the link from comment and disable "Parallelize Build"
Proceed with this link in case of glog error => https://github.com/facebook/react-native/issues/14382 (here I a bit messed up with several answers but moreless I did this yarn cache clean rm -rf node_modules yarn install and then this => https://github.com/facebook/react-native/issues/14382#issuecomment-405472763 and https://github.com/facebook/react-native/issues/14382#issuecomment-422755411)
Then in case of RCTBridge error I go with this answer => https://github.com/facebook/react-native/issues/31412#issuecomment-872032401
And in the end when app was succesfuly build but crash on launch I went with Solution number 2 from this link => https://blog.cpming.top/p/rn-error-unknown-argument-type-attribute-in-method

Importing From Chainlink: Source Not Found. File out of allowed directories

I have run into this issue multiple times. Everytime I try to import something from github and adding it usign the yarn package manager I am shown with the error below. This time I have been working on a Solidity contract and wanted to import something from the chianlink repository. One workaround I discovered was copying the required files and including them on the project directly but I do not want to do that. So, I wanted a solution to fix this rather than working around it.
I am using the following:
VsCode
WSL 2.0
Hardhat Framework
Yarn Package Manager
So the issue is while I am trying to import:
import "#chainlink/contracts/src/v0.8/VRFV2WrapperConsumerBase.sol";
I am shown:
Source "#chainlink/contracts/src/v0.8/VRFV2WrapperConsumerBase.sol" file outside of allowed directories.
I have already done:
yarn add --dev #chainlink/contracts
Here is my package.json file contents:
{
"devDependencies": {
"#chainlink/contracts": "^0.5.1",
"#nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers",
"#nomiclabs/hardhat-etherscan": "^3.1.0",
"#nomiclabs/hardhat-waffle": "^2.0.3",
"chai": "^4.3.6",
"dotenv": "^16.0.3",
"ethereum-waffle": "^3.4.4",
"ethers": "^5.7.1",
"hardhat": "^2.11.2",
"hardhat-contract-sizer": "^2.6.1",
"hardhat-deploy": "^0.11.18",
"hardhat-gas-reporter": "^1.0.9",
"prettier": "^2.7.1",
"prettier-plugin-solidity": "^1.0.0-beta.24",
"solhint": "^3.3.7",
"solidity-coverage": "^0.8.2"
}
}
Can anyone tell me what might be the cause of this issue? And how to fix it?
Try adding the full relative path to the directory. For example if your directory has a contracts folder and node_module folder and your contract lives within the contracts folder, your import statement for your chainlink contract would look like this:
import "../node_modules/#chainlink/contracts/src/v0.8/VRFV2WrapperConsumerBase.sol";
I have faced this issue a few times and have found this to work.

babel/core and babel/polyfill is not working for nodejs

"devDependencies": {
"#babel/cli": "^7.17.6",
"#babel/core": "^7.17.8",
"#babel/polyfill": "^7.12.1",
"#babel/preset-env": "^7.16.11"
}
}
This is my development dependencies and i keep getting the issue on the terminal;
npm WARN deprecated #babel/polyfill#7.12.1: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the #babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated core-js#2.6.12: core-js#\<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
Anybody know why this is happening?
I was just going to use babel in my project and some of them didn't work somehow.

#nuxt/babel-preset-app > core-js#2.6.12: core-js#<3.4 is no longer maintained and not recommended

I have an application which has core.js dependecy defined as "core-js": "^3.19.1" in package.json. But as I try to run yarn install it thorws me a warning
#nuxt/babel-preset-app > core-js#2.6.12: core-js#<3.4 is no longer maintained and not recommended
I dont understand how is it possible cause there is explicitely defined version 3.19
Can somebody explain me please what happened there and how to fix it?
Thanks a lot.

I am having an issue with babel building angular app for production

Current Behavior
I am building my angular project on circleci and it just keeps failing with the following message:
An unhandled exception occurred: Cannot find module
'#babel/compat-data/corejs3-shipped-proposals'
Require stack:
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/preset-env/lib/index.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/core/lib/config/files/plugins.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/core/lib/config/files/index.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/core/lib/index.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/src/utils/process-bundle.js
/home/circleci/eleven-app/frontend/node_modules/jest-worker/build/workers/processChild.js
I am using
{
"#babel/plugin-proposal-numeric-separator": "^7.8.3",
"core-js": "3.2.1",
"tslib": "^1.11.1",
"#babel/compat-data": "~7.8.0",
"#babel/runtime-corejs3": "^7.9.2",
"ts-node": "7.0.0",
"tslint": "5.11.0",
"typescript": "3.5.3",
}
resolutions: {
"#babel/preset-env": "^7.8.7"
}
here is npx nls why #babel/preset-env output:
eleven-app-frontend > #angular-devkit/build-angular > #babel/preset-env#7.8.7
eleven-app-frontend > #nrwl/angular > #nrwl/cypress > #cypress/webpack-preprocessor > #babel/preset-env#7.9.5
eleven-app-frontend > #nrwl/cypress > #cypress/webpack-preprocessor > #babel/preset-env#7.9.5
Thank you for reading.
Had the same issue today, so I'm assuming there's something weird with the latest version.
My package.json had the following:
"#babel/compat-data": "~7.9.0"
I removed the ~ to force 7.9.0 instead of allowing newer ones and it did the trick for me.
There's probably a newer version that works but since you opened an issue for them (https://github.com/babel/babel/issues/11427) I'll just wait for more details.
I've the same issue when using TravisCI & Vue with Jest and Babel. My test suit has been failing. Adding "#babel/compat-data": "7.9.0" to devDependencies in my package.json file solved my problems.
These 3 options we came up with so far:
Adapt dependency of babel/preset-env to v7.9.0: "#babel/preset-env": "=7.9.0"
In case you use a NodeJS Docker Image, fix the version to something below 13.13, i.e.: node:13.12.0-alpine
Adding or upgrading "#babel/compat-data": "7.9.0" to devDependencies
The solutions are temporarily and should be removed as soon as there is an actual fix of the node images or the babel/preset-env library.
Linked Github issues:
babel - https://github.com/babel/babel/issues/11427
nodejs - https://github.com/nodejs/node/issues/32852#issuecomment-613652057
I had the same issue today in Github Actions build for a Vue FE project. It builds fine locally. I'm going to try the solution above and I'll report back...
Update: After looking through the package-lock file, my solution was to explicitly add "#babel/compat-data" to the prod dependencies. Previously it was only a dependency for some dev dependencies. So my package.json now looks like:
"dependencies": {
"#babel/compat-data": "^7.8.6",
...
Same issue.
Solved it by following above advices + removing node_modules (see this github thread):
Added explicitly #babel/compat-data": "7.9.0" to devDependencies
Upgraded node (13.3 to 14.0 in my case)
Had to remove my node_modules folder and re run yarn (or npm)
If you're using yarn, try to remove the yarn.lock file in your project. And then reinstall by run yarn install; you'll get a new yarn.lock file, which is fine.
It worked for me in my Next.js project.