Based on this guide:
https://vuepress.vuejs.org/guide/getting-started.html#quick-start
I am trying to create a new vuepress project with:
$ yarn create vuepress sample-docs
But I get:
$ yarn create vuepress sample-docs
yarn create v1.22.4
[1/4] Resolving packages...
error Couldn't find package "create-vuepress" on the "npm" registry.
No hits on google for that error. Any suggestions?
Related
I am trying to make an application with react-relay following the step-by-step guide on the relay documentation. After running yarn install and adding the yarn relay script which runs "relay-compiler --src ./src --schema ./schema.graphql --language typescript". And I was getting an ENOTDIR error as below:
$ relay-compiler --src ./src --schema ./schema.graphql --language typescript
Error: spawn ENOTDIR
at ChildProcess.spawn (node:internal/child_process:412:11)
at Object.spawn (node:child_process:698:9)
at /home/Documents/workspace/react-relay/node_modules/relay-compiler/bin/relay-compiler:1841:31
at new Promise (<anonymous>)
at Function.isAvailable (/home/Documents/workspace/react-relay/node_modules/relay-compiler/bin/relay-compiler:1835:12)
at /home/Documents/workspace/relay-test/node_modules/relay-compiler/bin/relay-compiler:8221:61
at Generator.next (<anonymous>)
at asyncGeneratorStep (/home/Documents/workspace/react-relay/node_modules/#babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/home/Documents/workspace/react-relay/node_modules/#babel/runtime/helpers/asyncToGenerator.js:25:9)
at /home/Documents/workspace/react-relay/node_modules/#babel/runtime/helpers/asyncToGenerator.js:32:7
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have then updated my versions of node, npm, yarn. And tried cloning some relay example projects from github, and I was getting the same error message with all repos that uses relay.
Turned out it was because I don't have the required watchman package, this was resolved by installing Watchman on my machine.
I'm encountering the following message when installing packages:
YN0001: │ HTTPError: Response code 404 (Not Found)
at se.<anonymous> (C:\Code\.yarn\releases\yarn-berry.cjs:23:10082)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
This happens for both a local package using yarn add ../my-package or remote package (testing using yarn add lodash).
When I'm in another project on the same computer, the package is installed fine. What could be causing this?
This could be that a yarn link has been deleted. When making the symlink using yarn link, a resolutions field is added in package.json. Just having this link however is not adequate.
When I use yarn global install packages ,I will see the error "An unexpected error occurred: "ENOENT: no such file or directory, chmod '/usr/local/opt/nvm/versions/node/v10.15.0/bin/umi'". Now,I use nvm to control my node version.
My system is MacOs 10.15.3 and node version is v10.15.0.
Now,I use nvm to control node version.
yarn global add umi
# show error
yarn global v1.22.4
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Installed "umi#3.2.10" with binaries:
- umi
error An unexpected error occurred: "ENOENT: no such file or directory, chmod '/usr/local/opt/nvm/versions/node/v10.15.0/bin/umi'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/jokky/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
I solved this problem.
first ,I open the file .yarnrc.
add next line text
prefix "/path/.config/yarn"
this path is your yarn download path
When i do 'yarn install' i get this below error:
Error message:
yarn install v1.12.3
info No lockfile found.
[1/4] Resolving packages...
warning Resolution field "react#16.4.1" is incompatible with requested version "react#15"
**error Couldn't find package "#icons/material#^0.2.4" required by "react-color#^2.13.8" on the "npm" registry.**
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Doing this resolved my issue:
npm config set #icons:registry https://registry.npmjs.org/
Check if you have any other .npmrc or .yarnrc file in your root folders. It might override your project's configurations when you do a yarn install. Worked for me when I removed these files from my other directories
I can't install a forked git repository. I want to install version #0.31.0.
yarn add https://github.com/Goldjan/material-components-web.git#v0.31.0
I get the following error:
C:\Users\qjan8\Websites\XXXXXX>yarn add https://github.com/Goldjan/material-components-web.git#v0.31.0
yarn add v1.7.0
[1/4] Resolving packages...
error Can't add undefined: invalid package version undefined.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Does this have to be a name for the package.json?
I had a similar issue, the repo I was trying to add as a dependency didn't have a version field in the package.json. Adding that fixed the issue.