Written on
·
42
0
2강에서 서버 실행시 에러가 발생합니다.
무료 게임 강좌에서는 정상적으로 실행되었습니다.
node : 10.15.3
nuxt: 2.8.1
vue: 2.6.10
vue-server-renderer: 2.6.10
[로그 정보]
PS C:\vue-nodebird\ch1\front> npm run dev
> vue-nodebird-front@1.0.0 dev C:\vue-nodebird\ch1\front
> nuxt
WARN Address localhost:3000 is already in use. 11:49:13
i Trying a random port... 11:49:13
╭─────────────────────────────────────────────╮
│ │
│ Nuxt.js v2.8.1 │
│ Running in development mode (universal) │
│ │
│ Listening on: http://localhost:58015/ │
│ │
╰─────────────────────────────────────────────╯
i Preparing project for development 11:49:14
i Initial build may take a while 11:49:14
√ Builder initialized 11:49:14
√ Nuxt files generated 11:49:14
ERROR Unexpected token . 11:49:14
const r=Object.create(null),i=e=>globalThis.process?.env||undefined||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s$1=new Proxy(r,{get(e,o){return i()[o]??r[o]},has(e,o){const E=i();return o in E||o in r},set(e,o,E){const b=i(true);return b[o]=E,true},deleteProperty(e,o){if(!o)return false;const E=i(true);return delete E[o],true},ownKeys(){const e=i(true);return Object.keys(e)}}),t=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",B=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:true}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:true}],["CODEBUILD","CODEBUIL
SyntaxError: Unexpected token .
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (node_modules\@nuxt\friendly-errors-webpack-plugin\node_modules\consola\lib\index.cjs:2:13)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
노드버전10은 무료게임 강좌에서 보여주신 버전을 참고해서 설치했구요.
강좌1에서 10버전대를 사용하라고 메모장에 넣어주셔서 10을 유지했던건데요.
node 최신버전(22.14.0)을 설치 했더니, 보안오류가 발생하여,
아래 명령어를 실행한 후
Set-ExecutionPolicy RemoteSigned
진행해보니, 정상적으로 동작합니다^^
감사합니다.