react-bootstrap-sweetalert icon indicating copy to clipboard operation
react-bootstrap-sweetalert copied to clipboard

file: Error: ENOENT: no such file or directory

Open NASIR-HANIF opened this issue 1 year ago • 1 comments

react frontend show warnings

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/Buttons.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Buttons.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Buttons.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/Content.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Content.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Content.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/CustomIcon.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\CustomIcon.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\CustomIcon.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/ErrorIcon.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\ErrorIcon.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\ErrorIcon.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/InfoIcon.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\InfoIcon.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\InfoIcon.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/Input.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Input.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Input.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/Overlay.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Overlay.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Overlay.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/SuccessIcon.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\SuccessIcon.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\SuccessIcon.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/SweetAlert.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\SweetAlert.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\SweetAlert.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/Title.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Title.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\Title.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/ValidationMessage.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\ValidationMessage.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\ValidationMessage.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/components/WarningIcon.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\WarningIcon.tsx' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\components\WarningIcon.tsx'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/constants/patterns.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\constants\patterns.ts' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\constants\patterns.ts'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/default-props.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\default-props.ts' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\default-props.ts'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/index.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\index.ts' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\index.ts'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/prop-types.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\prop-types.ts' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\prop-types.ts'

WARNING in ./node_modules/react-bootstrap-sweetalert/dist/styles/SweetAlertStyles.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\styles\SweetAlertStyles.ts' file: Error: ENOENT: no such file or directory, open 'C:\Users\rehman\Desktop\material-ui\node_modules\react-bootstrap-sweetalert\src\styles\SweetAlertStyles.ts'

WARNING in ./src/bootstrap.min.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!./src/bootstrap.min.css) Module Warning (from ./node_modules/postcss-loader/dist/cjs.js): Warning

NASIR-HANIF avatar Sep 03 '24 02:09 NASIR-HANIF

The warnings indicate that the source maps for the react-bootstrap-sweetalert components are missing. To resolve this, you can try reinstalling the package or ignoring the source map warnings.

in my case the solution is ignore Source Map Warnings, If reinstalling doesn't help, you can configure Webpack to ignore source map warnings by adding the following to your Webpack configuration:

// webpack.config.js
module.exports = {
  // other configurations...
  module: {
    rules: [
      {
        test: /\.js$/,
        enforce: 'pre',
        use: ['source-map-loader'],
        exclude: /node_modules\/react-bootstrap-sweetalert/
      }
    ]
  }
};

magnocarvalho avatar Oct 18 '24 23:10 magnocarvalho