LightningContainerExamples icon indicating copy to clipboard operation
LightningContainerExamples copied to clipboard

Cannot find module "./" - salesforce-lightning-design-system.css:6

Open ghost opened this issue 8 years ago • 2 comments

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. (salesforce-lightning-design-system.css?39f4:4) at webpack_require (bootstrap 607e6301534f1e21907a:19) at Object. (app.js:22) at webpack_require (bootstrap 607e6301534f1e21907a:19) at bootstrap 607e6301534f1e21907a:39 at bootstrap 607e6301534f1e21907a:39

ghost avatar Oct 10 '17 19:10 ghost

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>

robertovg avatar Oct 18 '17 16:10 robertovg

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!

robertovg avatar Oct 18 '17 17:10 robertovg