miurla/morphic

got an error during the build

ChathurangaBW opened this issue · 3 comments

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#

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.

@Jarred-Sumner Thank you for your support!

@ChathurangaBW
Please try this: #176 (comment)
I will close the issue, so please comment if there are any problems.