I created a simple app for youtube channels management locally, it work fine when i run it on my environment, but when I want to check it globally it not working.
I tried first locally linking, then checking it like this sudo npm link, It link everything correctly but then when tried to use my command of my package it didn't work.
I also publish it to npm, but still not worked. I removed the package-lock.json & node_modules by typing:
rm -rf node_modules package-lock.json
and then reinstall it, but still not working.
Help me please.
I just want to use run command for starting my application/pkg
This is my Package.json file:
{
"name": "ytlocal",
"version": "0.0.1",
"description": "",
"main": "src/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/hamzaxeros/ytlocal.git"
},
"keywords": [
"youtube",
"channel",
"youtube-locally",
"youtube-channel",
"youtube-manager",
"youtube-management",
"youtube-channel-local"
],
"author": "Hamza Hussain",
"license": "MIT",
"bugs": {
"url": "https://github.com/hamzaxeros/ytlocal/issues"
},
"homepage": "https://github.com/hamzaxeros/ytlocal#readme",
"dependencies": {
"chalk": "^4.1.2",
"inquirer": "^8.2.0",
"shelljs": "^0.8.4"
},
"devDependencies": {
"eslint": "^7.32.0"
},
"bin": {
"run": "src/index.js"
}
}
chmod +x ./src/index.jsthats it, then it will work fine.