onwidget / tailnext

⭕️ TailNext: Free template using Next.js 14 app router and Tailwind CSS.
https://tailnext.vercel.app/
MIT License
331 stars 129 forks source link

dev script error #19

Closed Riv3tz closed 10 months ago

Riv3tz commented 1 year ago

Version: "next": "^13.4.1",

Error:

SyntaxError: Unexpected token '??='
    at wrapSafe (internal/modules/cjs/loader.js:1029:16)
    at Module._compile (internal/modules/cjs/loader.js:1078:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/home/z/per/tailnext/node_modules/next/dist/telemetry/post-payload.js:17:20)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @onwidget/tailnext@0.3.0 dev: 'next dev'
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @onwidget/tailnext@0.3.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/z/.npm/_logs/2023-05-17T03_06_46_659Z-debug.log

Steps to reproduce:

  1. npm install
  2. npm run dev (Error occurs here)

Maybe it is because of the version of nextjs is incompatible, I am not sure.

OS: Ubuntu 20.04

prototypa commented 1 year ago

Hello @Riv3tz

On my computer it works without problems, also in the cloud (vercel). I tried it with nextjs 13.4.1 and now I upgraded to 13.4.2 and it works without problems too. OS: Mac OS Ventura 13.2

To be sure, have you added something to the template or is it an exact clone with no changes giving you the problem?

What version of node are you using?

dndeveloper-saurabh commented 1 year ago

I am also getting the exact same error with the same scenario. I am using Nodejs version v14.21.2.

Riv3tz commented 1 year ago

To be sure, have you added something to the template or is it an exact clone with no changes giving you the problem? @prototypa It is an exact clone. No changes. What version of node are you using? v14.21.3

@dndeveloper-saurabh are you on Ubuntu as well?

prototypa commented 10 months ago

Hello @Riv3tz and @dndeveloper-saurabh

Maybe it's because Nextjs 13 requires node 16.14.0 or higher: https://nextjs.org/docs/pages/building-your-application/upgrading/version-13

Please check this.

I'll close the ticket. If there are still problems, leave a comment and I will open it and we will review more details. Everything works well for me and I have tested it in several environments.