ai-code-translator icon indicating copy to clipboard operation
ai-code-translator copied to clipboard

npm run dev error

Open supersaiyan2019 opened this issue 1 year ago • 2 comments

[email protected] dev next dev

/root/ai-code-translator/node_modules/next/dist/cli/next-dev.js:362 showAll: args["--show-all"] ?? false, ^

SyntaxError: Unexpected token '?' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object.dev (/root/ai-code-translator/node_modules/next/dist/lib/commands.js:10:30) at Object. (/root/ai-code-translator/node_modules/next/dist/bin/next:141:28) at Module._compile (internal/modules/cjs/loader.js:999:30)

supersaiyan2019 avatar Apr 08 '23 02:04 supersaiyan2019

Also got the following error when provides API key with query

This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/file.js (evalmachine.:5724:19) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/formdata.js (evalmachine.:5881:49) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/body.js (evalmachine.:6094:35) at __require (evalmachine.:14:50) at ../../node_modules/.pnpm/[email protected]/node_modules/undici/lib/fetch/response.js (evalmachine.:6510:49) at __require (evalmachine.:14:50) at (evalmachine.:11635:30) at requireFn (file:///home/user/ai-code-translator/node_modules/next/dist/compiled/edge-runtime/index.js:1:7079) { name: 'TypeError'

QCTW avatar Apr 11 '23 10:04 QCTW

@supersaiyan2019 I had the same problem and I solved it updating Node at the last version

simonecolombani avatar Apr 11 '23 19:04 simonecolombani