I'm trying to install yarn but everytime it's this same error:
yarn
yarn install v1.15.2
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz: error:0909006C:PEM routines:get_name:no start line".
info If you think this is a bug, please open a bug report with the information provided in "C:\\laragon\\www\\demo\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Related
I used yarn to install almost 1000 js libraries. When it's done I run yarn install --check-files and it warns me that it left out just a few. I find this bizarre that it installs almost all and only warns about not installing a small handful (but I'll read up on why yarn's doing that later), for now, I need to figure out what to do about these unmet peer dependencies?
Example output
yarn install --check-files
yarn install v1.22.19
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > babel-loader#8.3.0" has unmet peer dependency "#babel/core#^7.0.0".
warning " > babel-plugin-polyfill-corejs2#0.3.3" has unmet peer dependency "#babel/core#^7.0.0-0".
warning " > babel-plugin-polyfill-corejs3#0.6.0" has unmet peer dependency "#babel/core#^7.0.0-0".
warning " > babel-plugin-polyfill-regenerator#0.4.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning " > bootstrap#4.6.2" has unmet peer dependency "popper.js#^1.16.1".
[4/4] 🔨 Building fresh packages...
✨ Done in 1.52s.
My guess is simply install them with
yarn add #popper.js#^1.16.1
yarn add #babel/core#^7.0.0-0
I'm not totally sure though and want to get it right (also not sure if the first # and ^ should be there).
Note
Although I already mentioned it above and link to it, I reiterate, that this question differs from What does 'has unmet peer dependency' mean when installing a package with yarn? in that it asked about what a peer dependency is, whereas I (and 90 others) would like to know what must be done with yarn to ensure all (peer) dependencies are installed.
How to solve
Copy the name of the unmet peer dependency from the warning message, and add it using yarn like so:
yarn add '<unmet peer dependency>'
don't forget the ' and ' around the dependency, (and keep the # and ^ symbols if the unmet peer dependency has them).
Example
The error message in the question has
warning " > babel-plugin-polyfill-corejs2#0.3.3" has unmet peer dependency "#babel/core#^7.0.0-0".
so you'd run
yarn add '#babel/core#^7.0.0-0'
to add it.
Repeat this until all the warnings have gone when you run yarn install --check-files and the output just looks something like this (no warnings any more):
yarn install --check-files
yarn install v1.22.19
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
✨ Done in 1.54s.
without this error, my angular cli never installed. do not know the real issue. here is the error:
PS E:\Training\NxWorkshop\angular-cli> yarn install --network-timeout=500000
yarn install v1.22.17
info No lockfile found.
[1/4] Resolving packages...
warning #angular-devkit/build-angular > stylus > css > source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
[2/4] Fetching packages...
[#------------------------------------------------------------------------------------------------------------------------------------------------------------------] 6/851node:_tls_wrap:411
owner._tlsOptions.isServer ? 'server' : 'client', err,
^
TypeError: Cannot read properties of undefined (reading 'isServer')
at TLSWrap.onerror (node:_tls_wrap:411:27)
PS E:\Training\NxWorkshop\angular-cli>
how to solve it? what should i do?
thanks in advance
I try to install Plotly extension to Jupiterlab. After I installed every package (Anaconda, jupyterlab "ipywidgets>=7.5") I try to install "jupyter labextension install jupyterlab-plotly#4.14.3" but I got an error message: RuntimeError: JupyterLab failed to build
I try to identify the problem from the Log file, but I have no idea what to do next
The log file:
Yarn configuration loaded.
Node v15.12.0
"C:\Users\Szarka Roland\anaconda3\npm.CMD" pack jupyterlab-plotly#4.14.3
npm notice
npm notice package: jupyterlab-plotly#4.14.3
npm notice === Tarball Contents ===
npm notice 156B README.md
npm notice 6.3kB dist/javascript-renderer-extension.js
npm notice 1.0kB package.json
npm notice 545B style/index.css
npm notice 1.0kB style/plotly.svg
npm notice === Tarball Details ===
npm notice name: jupyterlab-plotly
npm notice version: 4.14.3
npm notice filename: jupyterlab-plotly-4.14.3.tgz
npm notice package size: 3.1 kB
npm notice unpacked size: 9.1 kB
npm notice shasum: bb424a50226c2ce1b816f061a8123f0f42418fc0
npm notice integrity: sha512-6ZdmIQ5fDiBTY[...]nASwRNCf1U1Cg==
npm notice total files: 5
npm notice
jupyterlab-plotly-4.14.3.tgz
Yarn configuration loaded.
Node v15.12.0
Building jupyterlab assets (build:prod:minimize)
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js" install --non-interactive
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents#1.2.11: The platform "win32" is incompatible with this module.
info "fsevents#1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "jupyterlab-plotly > #lumino/widgets > #lumino/coreutils#1.5.3" has unmet peer dependency "crypto#1.0.1".
[5/5] Building fresh packages...
success Saved lockfile.
Done in 9.81s.
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js" yarn-deduplicate -s fewer
yarn run v1.15.2
error Command "yarn-deduplicate" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js"
yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.52s.
> node "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\staging\yarn.js" run build:prod:minimize
yarn run v1.15.2
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js
node:internal/modules/cjs/loader:352
throw err;
^
Error: Cannot find module 'C:\Users\Szarka Roland\anaconda3\share\jupyter\lab\staging\node_modules\which\which.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:344:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:557:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:910:27)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (C:\Users\Szarka Roland\anaconda3\share\jupyter\lab\staging\node_modules\#jupyterlab\buildutils\lib\ensure-max-old-space.js:28:28)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32) {
code: 'MODULE_NOT_FOUND',
path: 'C:\\Users\\Szarka Roland\\anaconda3\\share\\jupyter\\lab\\staging\\node_modules\\which\\package.json',
requestPath: 'which'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
JupyterLab failed to build
Traceback (most recent call last):
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\debuglog.py", line 47, in debug_logging
yield
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 105, in start
command=command, app_options=app_options)
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\commands.py", line 459, in build
command=command, clean_staging=clean_staging)
File "C:\Users\Szarka Roland\anaconda3\lib\site-packages\jupyterlab\commands.py", line 669, in build
raise RuntimeError(msg)
RuntimeError: JupyterLab failed to build
Exiting application: jupyter
When I want to upgrade a dependency of my project (lodash package), I run the following command:
yarn upgrade lodash
I face with the following error:
yarn upgrade v1.12.3
[1/4] Resolving packages...
[2/4] Fetching packages...
error https://registry.yarnpkg.com/path-postId/-/path-postId-2.0.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
I consulted the mentioned page but I couldn't find any useful information to resolve the issue.
The following steps resolved the problem:
Remove the yarn.lock file.
rm yarn.lock
Recreate the yarn.lock file by running the following command:
yarn install
Upgrade the dependency using --skip-integrity-check:
yarn upgrade --skip-integrity-check lodash
I want deploy my JHipster application to Heroku, but when I run command "jhipster heroku", I received the following error:
Installing Heroku CLI deployment plugin
× { Error: Command failed: heroku plugins:install heroku-cli-deploy --force
Installing plugin java... yarn add v1.12.3
Installing plugin java... [1/4] Resolving packages...Installing plugin java... [2/4] Fetching packages...Installing plugin java... [3/4] Linking dependencies...Installing plugin java... [4/4] Building fresh packages...Installing plugin java... success Saved 1 n
ew dependency.Installing plugin java... info Direct dependenciesInstalling plugin java... └─ #heroku-cli/plugin-java#3.0.1Installing plugin java... Done in 2.97s.Installing plugin java... installed v3.0.1
Installing plugin --force... yarn add v1.12.3
Installing plugin --force... info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.Installing plugin --force... !
error Missing list of packages to add to your project.
Error: yarn add --force#latest --non-interactive --mutex=file:C:/Users/start/AppData/Local/heroku/yarn.lock --preferred-cache-folder=C:/Users/start/AppData/Local/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 1
at ChildProcess.forked.on (C:/Program Files/heroku/client/node_modules/#oclif/plugin-plugins/lib/yarn.js:31:28)
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
killed: false,
code: 1,
signal: null,
cmd: 'heroku plugins:install heroku-cli-deploy --force' }
Versions of tools:
JHipster: 5.1.0
Heroku: heroku/7.19.4 win32-x64 node-v11.3.0
Yarn: 1.7.0
Node: v8.10.0
I've already tried out the following commands:
heroku plugins:install java - successfully installed
heroku plugins:install heroku-cli-deploy --force -
Then an error occurs:
Installing plugin java... installed v3.0.1
error Missing list of packages to add to your project.
Installing plugin --force... !
Error: yarn add --force#latest --non-interactive --mutex=file:C:/Users/start/AppData/Local/heroku/yarn.lock --preferred-cache-folder=C:/Users/start/AppData/Local/heroku/yarn --check-files --registry=https://registry.npmjs.org exited with code 1
at ChildProcess.forked.on (C:/Program Files/heroku/client/node_modules/#oclif/plugin-plugins/lib/yarn.js:31:28)