just-boris / create-preact-app

Create Preact apps with no build configuration.
MIT License
95 stars 8 forks source link

Can't find Preact out of the box #17

Closed unicodeveloper closed 7 years ago

unicodeveloper commented 7 years ago
screen shot 2017-06-01 at 5 24 05 pm

Do i need to install preact and preact-compat after installation via this script?

Any reason why preact and preact-compat doesn't get installed automatically @just-boris

just-boris commented 7 years ago

Yes, you will need to install preact on your own. Unfortunately, the react and react-dom dependencies are hard-coded as a part of create-react-app command, so it is not possible to modify it via --scripts-version option. I will update the readme with that information.

just-boris commented 7 years ago

Sorry, tested this again, everything works fine for me. I have got preact installed without additional steps.

How did you create the app? In the Readme, we have the following command

create-react-app my-app --scripts-version @just-boris/preact-scripts
cd my-app/
npm start

Did it work for you?

unicodeveloper commented 7 years ago

And you didn't get the failed to compile error?

just-boris commented 7 years ago

I have got spinning React logo, as it was expected for demo page.

sconnelley commented 7 years ago

I can verify the behavior @unicodeveloper experienced. Works fine after manually install preact and preact-compact. I am using create-react-app at version 1.3.1 if that's helpful.

unicodeveloper commented 7 years ago

Aha, I thought I was the only one.

On Sat, Jun 3, 2017 at 12:47 PM Sean Connelley notifications@github.com wrote:

I can verify the behavior @unicodeveloper https://github.com/unicodeveloper experienced. Works fine after manually install preact and preact-compact. I am using create-react-app at version 1.3.1 if that's helpful.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/just-boris/create-preact-app/issues/17#issuecomment-305970035, or mute the thread https://github.com/notifications/unsubscribe-auth/ACz20aTeqnhBB7s0DEUjFibrLMjzF-kFks5sAUfZgaJpZM4NtPKz .

-- Best Regards,

Otemuyiwa Prosper Technical Writer | Auth0 auth0.com https://auth0.com/ Google Developer Expert (c) +234-708-909-5645 | @unicodeveloper https://twitter.com/unicodeveloper | prosper.otemuyiwa1 ( Skype )

unicodeveloper commented 7 years ago

Node.js version: 7.10.0

OS : Mac OS X Sierra

On Sat, Jun 3, 2017 at 5:50 PM Boris Serdiuk notifications@github.com wrote:

Could you also tell me OS and Node.js version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/just-boris/create-preact-app/issues/17#issuecomment-305987056, or mute the thread https://github.com/notifications/unsubscribe-auth/ACz20frmGK7kdCS_OEpa_fjwvJJZv-ZEks5sAY7IgaJpZM4NtPKz .

-- Best Regards,

Otemuyiwa Prosper Technical Writer | Auth0 auth0.com https://auth0.com/ Google Developer Expert (c) +234-708-909-5645 | @unicodeveloper https://twitter.com/unicodeveloper | prosper.otemuyiwa1 ( Skype )

just-boris commented 7 years ago

Confirm the problem. I could not reproduce it before because I had and older version of create-react-command.

As the only possible solution, I recommend you to run npm install or yarn, depending what you are using, before starting the server. I will add this as a part of setup steps in README.md.