skully-coder / competitiveprogramming

This repository aims to contain solutions and explanations to various competitive programming problems, which may be important for interviews and online tests of different companies.
https://skully-coder.github.io/competitiveprogramming/
MIT License
38 stars 91 forks source link

[BUG] 'website' folder visible in "Categories" on Dashboard #227

Closed Athi223 closed 2 years ago

Athi223 commented 2 years ago

Bug Description

The "website" folder is visible along with others on Website's Category page

Bug location

Bug location

image

skully-coder commented 2 years ago

@Athi223 can you tell me the node version you are using?

skully-coder commented 2 years ago

Because I am receiving this error:

Compiled with problems:X

ERROR in ./node_modules/power-assert-context-formatter/lib/legacy-context-traversal.js 5:15-39

Module not found: Error: Can't resolve 'util' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/power-assert-context-formatter/lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
    - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "util": false }

ERROR in ./node_modules/power-assert-context-traversal/lib/context-traversal.js 5:15-39

Module not found: Error: Can't resolve 'util' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/power-assert-context-traversal/lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
    - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "util": false }

ERROR in ./node_modules/power-assert-renderer-assertion/index.js 7:15-39

Module not found: Error: Can't resolve 'util' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/power-assert-renderer-assertion'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
    - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "util": false }

ERROR in ./node_modules/power-assert-renderer-comparison/index.js 5:15-39

Module not found: Error: Can't resolve 'util' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/power-assert-renderer-comparison'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
    - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "util": false }

ERROR in ./node_modules/power-assert-renderer-diagram/index.js 5:15-39

Module not found: Error: Can't resolve 'util' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/power-assert-renderer-diagram'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
    - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "util": false }

ERROR in ./node_modules/power-assert-renderer-file/index.js 5:15-39

Module not found: Error: Can't resolve 'util' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/power-assert-renderer-file'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
    - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "util": false }

ERROR in ./node_modules/power-assert/index.js 12:17-34

Module not found: Error: Can't resolve 'assert' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/power-assert'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
    - install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "assert": false }

ERROR in ./node_modules/universal-deep-strict-equal/index.js 25:13-37

Module not found: Error: Can't resolve 'buffer' in '/home/abhinav/Documents/competitiveprogramming/website/node_modules/universal-deep-strict-equal'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "buffer": require.resolve("buffer/") }'
    - install 'buffer'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "buffer": false }
Athi223 commented 2 years ago

@skully-coder Yeah actually I encountered the same when I made the setup. Apparently its due to webpack 5. I thought you'd be having the previous setup since you deployed it some time ago.

I had to downgrade webpack using npm i webpack@^4 and then it worked. Try that once

skully-coder commented 2 years ago

Yes, it worked. Deploying

Athi223 commented 2 years ago

@skully-coder you might need to commit the change to package.json too, since we've explicitly added a webpack version so it probably reflected in json

skully-coder commented 2 years ago

Done