Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library throw loader error when import in react cra #197

Closed
mmustafau opened this issue Nov 17, 2021 · 2 comments
Closed

library throw loader error when import in react cra #197

mmustafau opened this issue Nov 17, 2021 · 2 comments

Comments

@mmustafau
Copy link

mmustafau commented Nov 17, 2021

hi,

I want to use this library with react-player library.

At this official example,this package works fine. You can see demo

In my application it throws loaders error.

./node_modules/screenfull/index.js 105:54
Module parse failed: Unexpected token (105:54)
File was processed with these loaders:
  ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|   element: {
|     enumerable: true,
     get: () => document[nativeAPI.fullscreenElement] ?? undefined
|   },
|   isEnabled: {

package.json

 "react": "^16.13.1",
 "react-dom": "^16.13.1",
 "react-player": "^2.9.0",
 "react-router-dom": "^5.1.2",
 "redux": "^4.0.5",
 "redux-thunk": "^2.3.0",
 "react-scripts": "^4.0.3"

 "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },

Thanks for the help

@sindresorhus
Copy link
Owner

Duplicate of #195

@sindresorhus sindresorhus marked this as a duplicate of #195 Nov 17, 2021
@mmustafau
Copy link
Author

As a quick workaround,
You can downgrade screenfull version to 5.2.0.
In version 6.0.0. engine is higher than node v.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants