udacimak: Installation fails on youtube-dl - Installation dependencies?
Hello,
I’m installing the most recent version of node an npm via these instructions: https://websiteforstudents.com/install-the-latest-node-js-and-nmp-packages-on-ubuntu-16-04-18-04-lts/
When i run npm install -g udacimak I get the following error:
> youtube-dl@1.12.2 postinstall /usr/lib/node_modules/udacimak/node_modules/youtube-dl
> node ./scripts/download.js
/usr/lib/node_modules/udacimak/node_modules/mkdirp/index.js:90
throw err0;
^
Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/udacimak/node_modules/youtube-dl/bin'
at Object.fs.mkdirSync (fs.js:885:18)
at Function.sync (/usr/lib/node_modules/udacimak/node_modules/mkdirp/index.js:71:13)
at createBase (/usr/lib/node_modules/udacimak/node_modules/youtube-dl/lib/downloader.js:51:12)
at downloader (/usr/lib/node_modules/udacimak/node_modules/youtube-dl/lib/downloader.js:64:5)
at Object.<anonymous> (/usr/lib/node_modules/udacimak/node_modules/youtube-dl/scripts/download.js:3:1)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! youtube-dl@1.12.2 postinstall: `node ./scripts/download.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the youtube-dl@1.12.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I’m new to node and npm but know linux and other languages pretty well. I’m clearly missing something here.
Is there a specific way i need to install youtube-dl? I’m on ubuntu 16.04
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (6 by maintainers)
Commits related to this issue
- Merge pull request #1 from Alameen688/chore/upgrade-udacity-api Fix failing commands by upgrading to latest Udacity API — committed to drbothen/udacimak by Alameen688 2 years ago
Have you tried
sudo npm i -g udacimak?If that doesn’t work, try installing yarn and install via yarn instead and let me know if it works?
This works for me. sudo npm install -g udacimak --unsafe-perm=true --allow-root
I created a new 18.04 vm and started clean. I ran into the same issues with clean installations of node.js and npm.
I then found this page ‘https://docs.npmjs.com/getting-started/fixing-npm-permissions’
The procedure there allowed me to install but still throws an npm update error at the end. I can live with this.
Installation with npm works now:
Yes, agreed, I should have clarified. Udacimak is running and scraping content just fine.