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

The @jsx React.DOM pragma has been deprecated as of React 0.12 #364

Closed
elliottsj opened this issue Feb 25, 2015 · 2 comments
Closed

The @jsx React.DOM pragma has been deprecated as of React 0.12 #364

elliottsj opened this issue Feb 25, 2015 · 2 comments
Labels
package: material-ui Specific to @mui/material

Comments

@elliottsj
Copy link
Contributor

When bundling material-ui using babel-loader, this deprecation error appears:

ERROR in ./~/material-ui/lib/js/input.js
Module build failed: SyntaxError: /Users/Spencer/.../node_modules/material-ui/lib/js/input.js: Line 1: The @jsx React.DOM pragma has been deprecated as of React 0.12
> 1 | /** @jsx React.DOM */
    | ^
  2 | 
  3 | var React = require('react');
  4 | var Classable = require('./mixins/classable');
    at File.errorWithNode (/Users/Spencer/.../node_modules/babel-core/lib/babel/transformation/file.js:361:13)
    at TraversalPath.exports.Program (/Users/Spencer/.../node_modules/babel-core/lib/babel/transformation/transformers/other/react.js:17:20)
    at TraversalPath.call (/Users/Spencer/.../node_modules/babel-core/lib/babel/traversal/path.js:115:24)
    at TraversalPath.visit (/Users/Spencer/.../node_modules/babel-core/lib/babel/traversal/path.js:136:8)
    at TraversalContext.visitNode (/Users/Spencer/.../node_modules/babel-core/lib/babel/traversal/context.js:24:20)
    at TraversalContext.visit (/Users/Spencer/.../node_modules/babel-core/lib/babel/traversal/context.js:32:17)
    at Function.traverse.node (/Users/Spencer/.../node_modules/babel-core/lib/babel/traversal/index.js:38:17)
    at traverse (/Users/Spencer/.../node_modules/babel-core/lib/babel/traversal/index.js:28:14)
    at Scope.traverse (/Users/Spencer/.../node_modules/babel-core/lib/babel/traversal/scope.js:47:3)
    at TransformerPass.transform (/Users/Spencer/.../node_modules/babel-core/lib/babel/transformation/transformer-pass.js:62:14)
    at /Users/Spencer/.../node_modules/babel-core/lib/babel/transformation/file.js:405:10
 @ ./~/material-ui/lib/index.js 17:9-30
@darekrossman
Copy link

How do I get this fix in the npm package? I'm having the same issue and have to manually delete these lines everytime I install?

@clayrisser
Copy link

Delete the following comment . . .

/** @jsx React.DOM */

@zannager zannager added the package: material-ui Specific to @mui/material label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: material-ui Specific to @mui/material
Projects
None yet
Development

No branches or pull requests

4 participants