Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Kamil
    @kamilnosek
    Hello, I've got a question regarding building applications. I'm using simple VPS with node.js support. Now I do not know how to build my next.js application to production.
    I thought that I should use next build && next export then copy out dir to the server but during this process, I faced some issues - when I change route - everything is okay, but if I refresh the page - the page is not found because the server is looking for this file in directories. So how can I deploy my nextjs application in production mode with VPS server with nodejs to do that properly?
    I tried one thing which is not working fine probably or I did something wrong.
    I added nodejs express server with app.prepare().then(() => // code there) and start server with forever library NODE_ENV=production node server.js and it's working fine, but seems this is working in a wrong way - seems it's normal server like in dev mode - so it shouldn't be like that. (I see thunder icon on the right-bottom corner and I see all files which are same as in dev mode) Thank you for your help!
    Bruce Sun
    @athrunsun
    大家好,https://github.com/vercel/next-plugins/tree/master/packages/next-less 中的安装步骤,是将 @zeit/next-less 和 less 保存为dependency而非devDependency,这个是什么原因呢?
    Miche
    @Cospoi
    如何使用sass的同时引入其他的css库 比如font awesome? 我尝试按照font awesome文档和stackoverflow给出的解决方案,font awesome使用正常了,但是我引入的scss不生效了
    sushmeet sunger
    @Sushmeet
    Hi everyone. Is this a chat for nextjs. If so I was looking for some guidelines on how to migrate apps. I see the Hulu case study on. Next but was wondering if there was a more detailed example.
    Devlin Duldulao
    @webmasterdevlin
    Hi. What kind of problem can we encounter if we use Nextjs and ASPNET Core? Nextjs needs a Nodejs server, right? How will they work together in terms of authentication and authorization?
    maxingcong
    @maxingcong
    image.png
    文件进行了压缩 ,为什么还这么大,需要怎么解决,
    zhangsixue-1992
    @zhangsixue-1992
    如何使用loacalstoarge
    Jemli Fathi
    @jemliF

    Getting this error : Class constructor App cannot be invoked without 'new' at new AppWrapper

    I am having this error too when migrating from v8.1 to 9.x, did you find the fix please?

    Arjun Biju
    @Arrow66
    hi
    when i first load my app there is blank page comes then the content shows
    how i am able to fix it ?
    every website does this . but with next js time taken to display the actual content is little more
    Arjun Biju
    @Arrow66
    i am on production build . have configured material ui as per the example
    Bleu
    @WayneVN
    @maxingcong 可否贴一下你的配置文件? 我之前处理过类似问题
    Dipinrajc
    @Dipinrajc
    When I run npm run dev, the dev server is too slow and memory leak is happening, Any help?
    CJYMl
    @CJYMl
    next.js百度只收录了主页咋回事啊
    Agusti Fernandez
    @agustif
    Hi, anyone knows how to enable experimental decorators syntax for a nextjs/vercel app?
    This is my error Syntax error: Support for the experimental syntax 'decorators-legacy' isn't currently enabled:
    I've opened a discussion with some code in here: https://github.com/vercel/next.js/discussions/16686
    SinglaAjay
    @SinglaAjay

    Hey Guys,

    Hope you are doing great!!

    I am new to nextJS, Want to migrate the reactJS app to nextJS. So how easy or difficult is to migrate the apps from react to NextJS and what are the main benefits of doing this?

    marin6699
    @marin6699
    请问getStaticPaths, getStaticProps在服务端该如何获取浏览器的cookie ?
    24KShign
    @24Kshign
    请问可以做到服务端渲染失败之后切换到静态文件渲染吗
    Anoop Gupta
    @anoop-gupt
    Hi all, Any pointer how to run two nextJS apps with zones on local with internal linking??
    lnstock
    @lnstock
    当页面文件为只读状态时,访问此页面会报404,怎么破?
    LuckyDonkey
    @LuckyDonkey
    npm ERR! enoent ENOENT: no such file or directory, rename 'D:\spy\sample-app\node_modules\@babel\parser' -> 'D:\spy\sample-app\node_modules\@babel.parser.DELETE'
    npm ERR! enoent This is related to npm not being able to find a file.
    安装next的时候出现这个错误,有人知道原因吗?
    JinTao
    @JinTaoOO
    问下 大佬们 富文本用哪个组件? 我试了下react-lz-editor 但是报错了
    有人咩
    子慕大诗人
    @zimv
    image.png
    这里沟通不便,不能及时回复,有疑问进交流群,如果二维码过期,可以安特我。
    子慕大诗人
    @zimv
    @marin6699 getInitialProps({ req }){req.headers.cookie}
    GeekThuG
    @GeekThuG
    Hey people i have problem to import css file in nextjs 8
    i use the component react-phone-input-2
    but when i add import 'react-phone-input-2/lib/style.css'
    he add in shunk but not display in application
    子慕大诗人
    @zimv
    image.png
    chendishen
    @chendishen
    之前版本的NEXTjs是怎么引入图片的,我忽然间发现已经改版了,现在是static静态文件目录,以前是public可是怎么引用图片来着
    chendishen
    @chendishen
    ok了,找到另一份文档了
    Elias Chaaya
    @chaaya

    Anyone with experience with next-auth?

    Got a problem with configuring the signIn callback. I need to check if the user has the role Admin before letting them access my application, if they are just a regular user I want to redirect them to the an error page.

    It works fine with redirecting them when user lacks the role admin, but when I as the documentation says return a Promise with true when the user is a admin, nextjs just keeps redirecting to my oauth2 server for login agin. Any suggestions?

        callbacks: {
          signIn: async (_user, _account, profile: IWorklyProfile) => {
            const isSomeKindOfAdmin =
              profile[ROLE_PATH].includes(Role.PartnerAdmin) ||
              profile[ROLE_PATH].includes(Role.CustomerAdmin);
            if (!isSomeKindOfAdmin) {
              return Promise.reject(new Error('Invalid access'));
            }
    
            return Promise.resolve(true);
          }
        }
    This message was deleted
    wonderl17
    @wonderl17
    @zimv 大佬再发一下群二维码吧
    Mohsen
    @mossen
    Hi guys, anyone can help me and give me a direction to implement CSRF token in Nextjs?
    笔记
    @kabimew
    问下大佬们,nextjs 命令行屏幕上如何支持实时显示eslint和typescript错误?
    YuHao Guan
    @Guanyuhao
    nextJS next/head自定义每个页面的头 路由切换样式会飞
    我也有遇到类似的问题 是因为使用了next/head 在样式飞的页面内
    Limw
    @lmw0221
    如何在nextjs项目中,使用eslint工具?
    子慕大诗人
    @zimv
    @wonderl17
    大家进交流群可以通过这个博客下面的链接,因为我会经常更新这里。这个gitter可能会很少进来https://www.cnblogs.com/1wen/p/10793868.html
    二维码在博客最下方