open-source-uom / myuom

The myUoM app is a project of the Open Software Team of Applied Informatics, University of Macedonia (https://opensource.uom.gr). It was designed to facilitate students' daily interactions with the university.
https://my.uom.gr
MIT License
26 stars 17 forks source link

Can't resolve module with javascript mimetype, a `.mjs` file, or a `.js` file where the package.json contains `"type": "module"` #160

Closed shivam-sharma7 closed 2 months ago

shivam-sharma7 commented 3 months ago
PS C:\Users\shivam sharma\Desktop\My Project\myuom> npm start

> studentsapp@0.1.0 start
> react-scripts start

(node:17800) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:17800) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...

One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.

babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will
ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
your devDependencies to work around this error. This will make this message
go away.
Failed to compile.

Module not found: Error: Can't resolve './theme/theme' in 'C:\Users\shivam sharma\Desktop\My Project\myuom\src'
Did you mean 'theme.js'?
BREAKING CHANGE: The request './theme/theme' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./src/index.js 47:0-34
Module not found: Error: Can't resolve './theme/theme' in 'C:\Users\shivam sharma\Desktop\My Project\myuom\src'
Did you mean 'theme.js'?
BREAKING CHANGE: The request './theme/theme' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./src/index.js 48:0-24
Module not found: Error: Can't resolve './App' in 'C:\Users\shivam sharma\Desktop\My Project\myuom\src'
Did you mean 'App.js'?
BREAKING CHANGE: The request './App' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./src/index.js 49:0-48
Module not found: Error: Can't resolve './reportWebVitals' in 'C:\Users\shivam sharma\Desktop\My Project\myuom\src'
Did you mean 'reportWebVitals.js'?
BREAKING CHANGE: The request './reportWebVitals' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./src/index.js 51:0-66
Module not found: Error: Can't resolve './contexts/departmentContext' in 'C:\Users\shivam sharma\Desktop\My Project\myuom\src'
Did you mean 'departmentContext.jsx'?
BREAKING CHANGE: The request './contexts/departmentContext' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

ERROR in ./src/index.js 52:0-16
Module not found: Error: Can't resolve './i18n' in 'C:\Users\shivam sharma\Desktop\My Project\myuom\src'
Did you mean 'i18n.js'?
BREAKING CHANGE: The request './i18n' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

webpack compiled with 5 errors
node 22

Chrome

shivam-sharma7 commented 3 months ago

@GeorgeApos cause of this commit- 05441ae150b8a080beee0db1ead0ea47b7b6ece4 so for now we have to revert the changes.