sungkwangsong / support

프로젝트 진행하면서 개발과 버그 이슈를 처리하기 위한 저장소
https://blog.sungkwang.me
1 stars 0 forks source link

Ionic 새 프로젝트 생성후 ionic serve 실행 시 TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined 에러 발생 #2

Closed sungkwangsong closed 4 years ago

sungkwangsong commented 4 years ago

Ionic 정보

Ionic:

   Ionic CLI       : 6.1.0 (/Users/sungkwang/.nodenv/versions/12.14.1/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 5.0.0

Capacitor:

   Capacitor CLI   : 1.5.0
   @capacitor/core : 1.5.0

Utility:

   cordova-res : 0.9.0
   native-run  : 0.3.0

System:

   NodeJS : v12.14.1 (/Users/sungkwang/.nodenv/versions/12.14.1/bin/node)
   npm    : 6.13.7
   OS     : macOS Catalina
  1. Ionic 설치 후 Ionic create 로 새로운 프로젝트 생성 (react 타입으로 프로젝트 생성)
  2. ionic serve 명령어 실행시 ERR_INVALID_ARG_TYPE 타입 에러발생
> react-scripts start
[react-scripts] ℹ 「wds」: Project is running at http://10.0.43.5/
[react-scripts] ℹ 「wds」: webpack output is served from /
[react-scripts] ℹ 「wds」: Content not from webpack is served from /Users/saltfactory/Projects/SSHanbit/SSHBApp/public
[react-scripts] ℹ 「wds」: 404s will fallback to /index.html
[react-scripts] Starting the development server...
[react-scripts]
[react-scripts] You can now view SSHBApp in the browser.
[react-scripts]   Local:            http://localhost:8100/
[react-scripts]   On Your Network:  http://10.0.43.5:8100/
[react-scripts] Note that the development build is not optimized.
[react-scripts] To create a production build, use npm run build.

[INFO] Development server running!

       Local: http://localhost:8100

       Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8100!

[react-scripts] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
[react-scripts]     at validateString (internal/validators.js:112:11)
[react-scripts]     at Object.join (path.js:1039:7)
sungkwangsong commented 4 years ago
  1. pakcage.json 파일을 열어서 react-scripts 버전을 3.3.0 에서 3.4.0 로 수정
    "react-scripts": "3.4.0",
  2. package.json 수정 후 npm install로 패키지 재설치.
  3. ionic serve 실행