Skip to content
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

Cannot find module defineComponent #1

Closed
StarpTech opened this issue Oct 22, 2017 · 5 comments
Closed

Cannot find module defineComponent #1

StarpTech opened this issue Oct 22, 2017 · 5 comments

Comments

@StarpTech
Copy link

The static files are mounted under /static did we miss to configure a prefix ?

$_mod.def("/marko$4.5.2/src/components/registry-browser", function(require, exports, module, __filename, __dirname) { var loadComponent = require('/marko$4.5.2/src/components/loadComponent-dynamic'/*'./loadComponent'*/);
var defineComponent = require('/marko$4.5.2/src/components/defineComponent'/*'./defineComponent'*/);

Error

index.js:84 Uncaught Error: Cannot find module "/marko$4.5.2/src/components/defineComponent" from "/marko$4.5.2/src/components"
    at moduleNotFoundError (index.js:84)
    at requireModule (index.js:434)
    at instanceRequire (index.js:130)
    at Module.<anonymous> (registry-browser.js:2)
    at Module_prototype.load (index.js:165)
    at requireModule (index.js:466)
    at instanceRequire (index.js:130)
    at Module.<anonymous> (init-components-browser.js:9)
    at Module_prototype.load (index.js:165)
    at requireModule (index.js:466)
@StarpTech
Copy link
Author

The missing file is not always the same. When I refresh the page multiple times a different component is missing.

@patrick-steele-idem
Copy link

I haven't figured it out yet, but fastify-static middleware seems to be extremely buggy (or the problem is happening somewhere else...). Lasso is writing the correct files to disk, but when the same file gets served up to the browser via the fastify-static middleware it has the content for a different file. This is not happening for all files, but a few of the files. Very bizarre.

@austinkelleher I'm guessing this app worked when you pushed the code. Any ideas?

@StarpTech
Copy link
Author

I replaced fastify with express and it works. Seems really like an issue in fastify-static.

@StarpTech
Copy link
Author

StarpTech commented Oct 25, 2017

The issue was fixed in a dependency update of fastify. Please reinstall and verify.

@StarpTech
Copy link
Author

Tested with fastify 0.30.3 and works fine.

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

No branches or pull requests

2 participants