The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
You may receive an EACCES error when you try to install a package globally. This indicates that you do not have permission to write to the directories that npm uses to store global packages and commands.
You can fix this problem using one of three options:
Change the permission to npm's default directory. Change npm's default directory to another directory. Install Node with a package manager that takes care of this for you. You should back-up your computer before moving forward.
| 'use strict'; | |
| const axios = require('axios'); // axios must be installed via npm i axios | |
| const webhookURL = "https://outlook.office.com/webhook/1234567890"; // Replace with a valid webhool URL obtained by adding an "Incomming Webhook" connector to your teams channel | |
| if (process.argv.length === 4) { | |
| const title = process.argv[2]; | |
| const message = process.argv[3]; | |
| console.log(`${title}, ${message}`); | |
| postMessageToTeams(title, message); | |
| } else { |