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

Include styled-jsx in the learn-starter #71

Closed
wants to merge 1 commit into from

Conversation

teofilomonteiro
Copy link

Without this the project doesn't start

Without this the project doesn't start
@vercel
Copy link

vercel bot commented Apr 2, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

next-learn-starter – ./basics/demo

🔍 Inspect: https://vercel.com/vercel/next-learn-starter/Cuzz6ADnnEprK97V3fVFtdBZcFD4
✅ Preview: https://next-learn-starter-git-fork-teofilomonteiro-patch-1.vercel.sh

next-seo-starter – ./seo/demo

🔍 Inspect: https://vercel.com/vercel/next-seo-starter/DbachkmxNBmmRy6MZKYiYxtiSNDA
✅ Preview: https://next-seo-starter-git-fork-teofilomonteiro-patch-1.vercel.sh

@leerob
Copy link
Member

leerob commented Apr 4, 2022

This could be related to your package manager. If styled-jsx is installed under node_modules/next/node_modules instead of installed at the top-level node_modules directory in your folder, there might be an issue.

vercel/styled-jsx#788

@leerob leerob closed this Apr 4, 2022
@leerob leerob mentioned this pull request Apr 4, 2022
@teofilomonteiro
Copy link
Author

This could be related to your package manager. If styled-jsx is installed under node_modules/next/node_modules instead of installed at the top-level node_modules directory in your folder, there might be an issue.

vercel/styled-jsx#788

I understand your point that is similar but is not the same. According to the issue that you link @leerob, this is related to react 18, not 17 which is used in this example.

I can easily reproduce it with npm from https://github.com/npm/cli/releases/tag/v7.20.3 to https://github.com/npm/cli/releases/tag/v8.1.0... It seems that it was fix on https://github.com/npm/cli/releases/tag/v8.1.1

You can easily reproduce it with the following dockerfile:

FROM node:16.14.0

# Install packages
RUN apt-get update -y && apt-get install -y git 

RUN npm install -g npm@7.20.3

RUN npx create-next-app nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter" && \ 
    cd nextjs-blog && \
    npm run build

You can just run docker build on this dockerfile and check it for your self.

So saying this, maybe its a good idea to put some kind of warning on this tutorial:
https://nextjs.org/learn/basics/create-nextjs-app/setup about npm being not working for some versions and recomend one of outside the npm versions that I said above.

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

Successfully merging this pull request may close these issues.

None yet

2 participants