ERROR in ./node_modules/css-loader?

后端 未结 8 1565
一生所求
一生所求 2021-02-03 22:14

I was trying to run an angular project in windows 10. It is the same project that I am doing in Ubuntu. When I clone the repository and install all the node packages I encounter

8条回答
  •  逝去的感伤
    2021-02-03 23:04

    I tried both

    npm rebuild node-sass

    and

    npm install --save node-sass

    Later by seeing EACCESS, i checked the folder permission of /node_modules, which was not 777 permission

    Then I gave

    chmod -R 777 *

    -R for recursively(setting the same permission not in the dir but also inside nested sub dir) * is for all files in current directory

    What is file permission

    To check for permission you can use

    ls -l
    

    If u don't know about it, first see here, then check the url

    Every file and directory has permission of 'rwx'(read, write, execute). and if 'x' permission is not there, then you can not execture, if no 'w', you can not write into the file. if some thing is missiing it will show in place of r/w/x with '-'. So, if 'x' permission is not there, it will show like 'rw-'

    And there will be 3 category of user Owner(who created the file/directory), Group(some people who shares same permission and user previlege), Others(general public)

    So 1st letter is 'd'(if it is a directory) or '-'(if it is not a directory), followed by rwx for owner, followed by for group, followed by other

    drwxrwxrwx
    

    For example, for 'node_modules'directory I want to give permission to owner all permission and for rest only read, then it will be

    drwxr--r--
    

    And about the number assume for 'r/w/x' it is 1 and for '-' it is 0, 777, first 7 is for owner, followed by group, followed by other

    Let's assume the permission is rwxr-xrw-

    Now 'rwx' is like '111' and it's equivalent decimal is 1*2^2+1*2^1+1*2^0=7

    Now 'r-x' is like '101' and it's equivalent decimal is 1*2^2+0*2^1+1*2^0=5

    Now 'rw-' is like '110' and it's equivalent decimal is 1*2^2+1*2^1+0*2^0=6

    So, it will be 756

提交回复
热议问题