You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
报错如下:
(node:99704) UnhandledPromiseRejectionWarning: D:\学习\React\EDS\node_modules\antd\es\locale\zh_CN.js:1
import Pagination from "rc-pagination/es/locale/zh_CN";
^^^^^^^^^^
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Module._compile (D:\学习\React\EDS\node_modules\pirates\lib\index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.newLoader [as .js] (D:\学习\React\EDS\node_modules\pirates\lib\index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (D:\学习\React\EDS\src\ssr/App.js:5:1)
(node:99704) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:99704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
import React from 'react';
import PropTypes from 'prop-types';
import {Provider} from 'react-redux';
import {ConfigProvider} from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
// import zhCN from 'antd/lib/locale-provider/zh_CN';
import {hot} from 'react-hot-loader/root';
import getStore from './store';
写法是这样的:https://codesandbox.io/embed/antd-reproduction-template-pyg3j
报错如下:
(node:99704) UnhandledPromiseRejectionWarning: D:\学习\React\EDS\node_modules\antd\es\locale\zh_CN.js:1
import Pagination from "rc-pagination/es/locale/zh_CN";
^^^^^^^^^^
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Module._compile (D:\学习\React\EDS\node_modules\pirates\lib\index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Object.newLoader [as .js] (D:\学习\React\EDS\node_modules\pirates\lib\index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (D:\学习\React\EDS\src\ssr/App.js:5:1)
(node:99704) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:99704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ctrl+点击可以跳转到文件,路径是没问题的,再说这事antd内部引用的啊,也不是babel的问题,其他的引用编译就没问题。。
The text was updated successfully, but these errors were encountered: