기본 콘텐츠로 건너뛰기

When unknown command and Windows Authorization error are kicking your ass : windows


Here is what had happened.

I was setting up my new work laptop.
I succeeded to clone the remote repository into local.
However, the previous employee who used it before me had set his windows user
and somehow it seemed loads of environment variables were set to his windows user including nodejs and npm.

So I reinstalled nodeJS and made sure that the installing location was set to Program files not to user Appdata.
I had no problem to run npm out of his user directory, however I could not fucking run nodemon and didn't know why.

After few researches, I figured out that I should have installed nodemon with global option.........

npm install -g nodemon

If the problem was it, I would have not write this blog post after so long time not bitting my laziness to come back here.

Nevertheless of my long journey just to run nodemon instead of moving my project directory into his user file(that felt like being defeated, not sure if it was by his weird userName or myself seeking for an easy and not teaching myself.. maybe both.), I got to have this authentication error. Honestly i don't remember how exact error code or message it was. Anyways the error message wanted to tell me that the nodemon was installed in his userfile and I have no right to access. (by the way this fucking protective user authentication stuff in windows has been kicking my ass a lot. Though it's not really my pc...I'm not even sure how much I can ruin it too lol just gotta be cautious)

Long story short,  I resolved it by running following command lines in the link below.

https://superuser.com/questions/106360/how-to-enable-execution-of-powershell-scripts

goodluck

댓글

이 블로그의 인기 게시물

JS 5.5 task6 Create an extendable calculator

<HTML>   <body>   </body>   <script> function Calculator() {   let methods = {     "-" : (a, b) => a - b,     "+" : (a, b) => a + b   };   //methods is an object which keeps key for operators   //and value to return the actual operation values   //each returns the result of operation that key(operator) does   this.calculate = function (str){     //calculate is one element in the function Calculator     //it takes the string and returns the value     //in the function element list is delimeted by , not ;     let split = str.split(" "),     a = +split[0],     op = split[1],     b = split [2]     if(!methods[op] || isNaN(a) || isNaN(b)) {       return NaN; // error handling     }     return methods[op](a,b);   }   this.addMethod = function(name, func){     methods[name] = func;     //this is how to add new key and ele to object   } } let powerCalc = new Calculator; powerCalc.addMethod("*&

JS 5.7 task5 Store read dates

<HTML>   <body>   </body>    <script>    let messages = [        {text: "Hello", from: "John"},        {text: "How goes?", from: "John"},        {text: "See you soon", from: "Alice"}    ];    let readMap = new WeakMap();    alert(readMap.size);    readMap.set(messages[0], new Date(2019, 3, 5));   </script> </HTML> <!-- task4 needed weakSet to save simply readmessage, this task needs to save THE TIME IT WAS READ along with the message itself the message out of the set or map means it hasn't been read I kinda feel good and bad at the same time to happen to read the solution but I do get to think more about the difference with tasks and be more available to understand the main contents so I think, its good? -->

JS 5.7 task 2 Filter anagrams

<HTML>   <body>   </body>    <script>    function aclean(arr){      let map = new Map();      for(let word of arr){        let sorted = word        .toLowerCase() // delete the case difference        .split('') //split it to sort        .sort() // sort it to delete the order difference        .join(''); // join to use as a key = one word        map.set(sorted, word);        //set saves keys by the key not by the value,        //the words canoot be saved when word with the same        //key is saved already        //map = is a collection of keyed value        //set = is a colelction of unique value      }       return Array.from(map.values());     }    let arr = ["nap", "teachers", "cheaters", "PAN", "ear", "era", "hectares"];    alert( aclean(arr) );   </script> </HTML> <!-- could not actually solve it but the solution logic was in