erdkse / adminlte-3-react

React 18.3.1 start-up project with AdminLTE 3.2.0 template
https://erdkse.com/projects/preview/adminlte-react
MIT License
256 stars 133 forks source link

profabric error #79

Closed JanBN closed 1 year ago

JanBN commented 1 year ago

Hello,

I have this error in prorabric components. I want to use my own webpack config from the project I'm trying to import adminlte into. What are these profabric components and why are they used ? Thank you for any information.

ERROR in ../node_modules/@profabric/react-components/index.js 2:0-72
Module not found: Error: Can't resolve '@profabric/web-components/loader' in 'C:\temp\Projects\BackendAndWeb\App\ClientApp\node_modules\@profabric\react-components'
Did you mean 'index.js'?
BREAKING CHANGE: The request '@profabric/web-components/loader' 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.
 @ ./theme_new/pages/profile/TimelineTab.tsx 28:25-63
 @ ./theme_new/pages/profile/Profile.tsx 53:36-60
 @ ./theme_new/App.tsx 61:32-74
 @ ./theme_new/index.tsx 24:28-44
erdkse commented 1 year ago

hey, it is my own implementation for WebCompenents, I implemented it for creating reusable components for all major frameworks like Angular, Vue, and React. Here it's repo. Including it in a project is actually a straight forward thing. I had no problem. But you drop using it anyway.

JanBN commented 1 year ago

Thank you for the reply. I have figured it out. I need to add this to the webpack config:

    {
      test: /\.m?js/,
      type: 'javascript/auto'
    },
    {
      test: /\.m?js/,
      resolve: {
        fullySpecified: false
      }
    },