miurla / morphic

An AI-powered search engine with a generative UI
https://morphic.sh
Apache License 2.0
6.04k stars 1.51k forks source link

got an error during the build #176

Closed ChathurangaBW closed 4 months ago

ChathurangaBW commented 4 months ago

root@ubuntu:/home/user/morphic# bun dev $ next dev --turbo /home/user/morphic/node_modules/next/dist/bin/next:80 import("../cli/next-build.js").then((mod)=>mod.nextBuild(options, directory).then(()=>process.exit(0)))).usage("[directory] [options]"); ^^^^^^

SyntaxError: Unexpected token import at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:616:28) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3 error: script "dev" exited with code 1 root@ubuntu:/home/user/morphic#

Jarred-Sumner commented 4 months ago

Please try running bun --bun next dev --turbo or update to a more recent version of Node.js. bun dev here is using bun as a package.json script runner like npm run, but because next specifies #!/usr/bin/env node at the top of the file, it's running in Node - and the system-installed version of Node you're using is likely the very old version which Ubuntu ships with.

miurla commented 4 months ago

@Jarred-Sumner Thank you for your support!

miurla commented 4 months ago

@ChathurangaBW Please try this: https://github.com/miurla/morphic/issues/176#issuecomment-2131080793 I will close the issue, so please comment if there are any problems.