@girish said in Using YARN:
yarn --version
Sorry for the late reply, it indeed does, however, when using custom commands, that are specified within your package.json
file, it doesn't work.
This is my package.json file:
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@babel/core": "^7.18.13",
"@babel/plugin-proposal-object-rest-spread": "^7.18.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@tailwindcss/forms": "^0.5.2",
"alpinejs": "^3.10.3",
"apexcharts": "^3.35.5",
"autoprefixer": "^10.4.8",
"axios": "^0.27",
"clockwork-browser": "^1.1.1",
"cross-env": "^7.0.3",
"laravel-echo": "^1.14.0",
"laravel-vite-plugin": "^0.5.0",
"lodash": "^4.17.21",
"mix-tailwindcss": "^1.3.0",
"object-path": ">=0.11.8",
"postcss": "^8.4.16",
"pusher-js": "^7.4.0",
"resolve-url-loader": "^5.0.0",
"sass": "^1.54.7",
"sass-loader": "^13.0.2",
"tailwindcss": "^3.1.8",
"vite": "^3.0.2",
"vue-template-compiler": "^2.7.10",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
"dependencies": {
"@alpinejs/mask": "^3.10.3",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/line-clamp": "^0.4.0"
}
}
When I run yarn build
I get the following error.
root@de780a18-b997-4803-a5b2-f07549cad279:/app/data/lectero# yarn build
yarn run v1.22.17
warning Skipping preferred cache folder "/usr/local/share/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-0".
$ vite build
warning Cannot find a suitable global folder. Tried these: "/usr/local, /usr/local/share/.yarn"
/bin/sh: 1: vite: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
And I also think it has something to do with the version of Yarn not being version 2