Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

marko 4.4 webpack Error: Cannot find module "." #16

Open
arthurchenn opened this issue May 26, 2017 · 1 comment
Open

marko 4.4 webpack Error: Cannot find module "." #16

arthurchenn opened this issue May 26, 2017 · 1 comment

Comments

@arthurchenn
Copy link

everything worked fine up until upgrading to marko 4.4.0, when building with webpack, this error cropped up
var markoCompiler = !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }());
Downgrading to marko 4.3.1 could fix the problem.
What's wrong? please!

@arthurchenn arthurchenn changed the title marko 4.4 Error: Cannot find module "." marko 4.4 webpack Error: Cannot find module "." May 26, 2017
@MarcelJoestingmeier
Copy link

Hello,

i was able to reproduce the error and i think i found the reason: Its because of webpack has changed the name of their context-object (https://webpack.js.org/api/loaders/#this-options) from 'this.options' to 'this.rootContext' with the release of webpack 4.

See this Link for example: bholloway/resolve-url-loader#79

Changing the naming in the '\node_modules\marko-loader\src\index.js'

grafik

solves the problem. I would like to create a branch and a pull request but im not allowed to.

Greetings
Marcel Jöstingmeier

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants