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 /ssr-bundle.js #223

Closed
SaraVieira opened this issue Jul 13, 2017 · 6 comments
Closed

Cannot find module /ssr-bundle.js #223

SaraVieira opened this issue Jul 13, 2017 · 6 comments

Comments

@SaraVieira
Copy link
Contributor

Hello,

I'm getting this error building a super simple website the source code is here:
https://github.com/Mindera/ocqd

screenshot 2017-07-13 09 54 03

Anyone have any ideia why this is happening ?

Thank you

@mukeshyadav
Copy link

I am facing same issue, did you get any success.

@rkostrzewski
Copy link
Collaborator

rkostrzewski commented Jul 16, 2017

This should be fixed in next release. For now either restarting build will help or using preact build --no-prerender

@SaraVieira
Copy link
Contributor Author

Awesome thanks @rkostrzewski !

Sent from my Bq Aquaris M5 using FastHub

@developit
Copy link
Member

1.4.0 should be going out tomorrow :)

@mikedpad
Copy link

mikedpad commented Dec 19, 2017

Apologies for commenting on a closed issue... I was scratching my head just now after creating a new project when I came across the same issue after running preact watch --prerender:

Build failed!

✖ ERROR Template execution failed: Error: Cannot find module '/Users/mikedpad/Projects/WebDev/MikeDPadPreact/build/ssr-build/ssr-bundle.js'
✖ ERROR   Error: Cannot find module '/Users/mikedpad/Projects/WebDev/MikeDPadPreact/build/ssr-build/ssr-bundle.js'
  
  - module.js:11 require
    internal/module.js:11:18
  
  - prerender.js:32 prerender
    [MikeDPadPreact]/[preact-cli]/lib/lib/webpack/prerender.js:32:11
  
  - render-html-plugin.js:33 Object.ssr
    [MikeDPadPreact]/[preact-cli]/lib/lib/webpack/render-html-plugin.js:33:54
  
  - template.html:39 module.exports
    [..]/[index.js!..]/[preact-cli]/lib/resources/template.html:39:37
  
  - index.js:264 
    [MikeDPadPreact]/[html-webpack-plugin]/index.js:264:16
  
  - util.js:16 tryCatcher
    [MikeDPadPreact]/[bluebird]/js/release/util.js:16:23
  
  - promise.js:512 Promise._settlePromiseFromHandler
    [MikeDPadPreact]/[bluebird]/js/release/promise.js:512:31
  
  - promise.js:569 Promise._settlePromise
    [MikeDPadPreact]/[bluebird]/js/release/promise.js:569:18
  
  - promise.js:606 Promise._settlePromiseCtx
    [MikeDPadPreact]/[bluebird]/js/release/promise.js:606:10
  
  - async.js:138 Async._drainQueue
    [MikeDPadPreact]/[bluebird]/js/release/async.js:138:12
  
  - async.js:143 Async._drainQueues
    [MikeDPadPreact]/[bluebird]/js/release/async.js:143:10
  
  - async.js:17 Immediate.Async.drainQueues
    [MikeDPadPreact]/[bluebird]/js/release/async.js:17:14

In case the previous comments weren't clear enough, if you haven't run the build process yet, run preact build first and preact watch --prerender should run without a hitch.

@tiagofrancafernandes
Copy link

preact build --no-prerender

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

6 participants