LightningContainerExamples
LightningContainerExamples copied to clipboard
Cannot find module "./" - salesforce-lightning-design-system.css:6
Followed all the steps in the README.md, let I get the following error in the Chrome console:
Uncaught Error: Cannot find module "./"
at webpackMissingModule (salesforce-lightning-design-system.css:6)
at Object.module.exports.list (salesforce-lightning-design-system.css:6)
at webpack_require (bootstrap 607e6301534f1e21907a:19)
at Object.
I'm exactly in the same situation.
I checked on package.json we load last version of https://github.com/salesforce-ux/design-system ( 2.4.3 ) but somehow when requiring it from app.js ( require("../../node_modules/@salesforce-ux/design-system/assets/styles/salesforce-lightning-design-system.css"); ) I got exactly the same problem.
I think should be something external related with items loaded from this css file, as on the log I also got this:
ERROR in ./~/css-loader!./~/@salesforce-ux/design-system/assets/styles/salesforce-lightning-design-system.min.css
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 405 Only POST allowed</title>
</head>
<body><h2>HTTP ERROR 405</h2>
<p>Problem accessing /services/Soap/u/39.0. Reason:
<pre> Only POST allowed</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
<!-- Body events -->
<script type="text/javascript">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken="null";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script>
</body>
</html>
Ok, I have the solution, it's basically in the package.json of the project, they declared the version of @salesforce-ux/design-system like:
"@salesforce-ux/design-system": "^2.1.4",
and it installs the last version of it, which has a different structure which makes the build to fail.
We have just simply to update it to the correct version it was coded like
"@salesforce-ux/design-system": "2.1.4",
I hope it helps anyone!