-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Failed to resolve existing module rmc-steps
#1422
Comments
you may need babel in your project |
@lordGuan sames, where have some problems when i import antd-mobile。 I have npm install rmc-steps |
Object spread is ES2018 not ES6 and a babel config is probably required. Although babel configs don't apply on node_modules I think |
@DeMoorJasper I added the babel。 but there have another problem。please see the previous image。 |
If the dependency is installed I'm not sure why it can't get resolved |
An example repo or a bit more info would be helpfull. There is a bug template if you file an issue, would be nice if you use that to reformat the issue :) |
@FourLeafClover did you try with |
Example here: package.json {
"dependencies": {
"antd-mobile": "^2.2.1",
"react": "^16.4.1"
}
} index.html <html>
<body>
<script src="./index.jsx"></script>
</body>
</html> index.jsx import Steps from "antd-mobile/es/steps";
parcel-antd-mobile/node_modules/antd-mobile/es/steps/index.js:7:20: Cannot resolve dependency 'rmc-steps'
5 | import _inherits from 'babel-runtime/helpers/inherits';
6 | import React from 'react';
> 7 | import RcSteps from 'rmc-steps';
| ^
8 | import Icon from '../icon';
9 |
10 | var Steps = function (_React$Component) { The
HISTORY.md LICENSE.md README.md assets lib package.json This happen even after I run |
rmc-steps
rmc-steps has a mistake field |
Glad you found the issue. I'll close this issue, please report this to https://github.com/react-component/m-steps |
Hi @DeMoorJasper , Is there a plan to handle it like this? If module not exist then downgrade to main? I'm not sure how many packages with this mistake in npm. |
I think this PR implements something similar: #1577 |
Yes, in that pr, parcel tries to load different files (like module, main, source) until it finds an existing one. That should solve the issue |
The text was updated successfully, but these errors were encountered: