Preact-cli: `preact build --prerender` blows up with nvm?

Created on 20 May 2017  路  3Comments  路  Source: preactjs/preact-cli

I use nvm and preact build --prerender blows and does not build to the build directory. I get this error:

/Users/sashton/.nvm/versions/node/v7.8.0/lib/~/preact-cli/lib/lib/entry.js
Module not found: Error: Can't resolve 'preact' in '/Users/sashton/.nvm/versions/node/v7.8.0/lib/node_modules/preact-cli/lib/lib'

Plus lots of other output. Is the app directory resolution breaking somehow? Somehow it's trying to fetch the version of Preact installed for the global preact-cli instead of the local application `preact'

feedback needed

Most helpful comment

Yep, success! Thanks all

All 3 comments

Ah looks like we are missing some parameters to module-alias. Good catch.

@scottmas do you still experience the problem? I'm using preact build in nvm without any problems. If there are any #133 should take care of them.

Yep, success! Thanks all

Was this page helpful?
0 / 5 - 0 ratings