• 카테고리

    질문 & 답변
  • 세부 분야

    기타 (개발 · 프로그래밍)

  • 해결 여부

    미해결

3번째 강의부터 막혀버렸습니다. (npm install)

20.03.29 22:20 작성 조회수 402

0

npm install -g tidory

tidory --version

-> 7.2.1 사용 중 입니다.

npx create-tidory-app my-app

cd my-app

npm install

-> npm ERR! 발생 합니다. (code : ENOENT)

tidory start

-> 아래 4달 전 2번째 WebPack Compile Error 올려주신 분과 같은 에러 메시지가 출력되면서 실행되지 않습니다.

답변 부탁 드립니다!

(... 생략 ...)

13250 silly saveTree     | `-- neo-async@2.6.1
13250 silly saveTree     `-- yargs@8.0.2
13250 silly saveTree       +-- camelcase@4.1.0
13250 silly saveTree       +-- cliui@3.2.0
13250 silly saveTree       | `-- string-width@1.0.2
13250 silly saveTree       +-- os-locale@2.1.0
13250 silly saveTree       | +-- execa@0.7.0
13250 silly saveTree       | | +-- cross-spawn@5.1.0
13250 silly saveTree       | | +-- get-stream@3.0.0
13250 silly saveTree       | | +-- is-stream@1.1.0
13250 silly saveTree       | | +-- npm-run-path@2.0.2
13250 silly saveTree       | | +-- p-finally@1.0.0
13250 silly saveTree       | | `-- strip-eof@1.0.0
13250 silly saveTree       | `-- mem@1.1.0
13250 silly saveTree       |   `-- mimic-fn@1.2.0
13250 silly saveTree       +-- string-width@2.1.1
13250 silly saveTree       | +-- is-fullwidth-code-point@2.0.0
13250 silly saveTree       | `-- strip-ansi@4.0.0
13250 silly saveTree       |   `-- ansi-regex@3.0.0
13250 silly saveTree       +-- which-module@2.0.0
13250 silly saveTree       +-- y18n@3.2.1
13250 silly saveTree       `-- yargs-parser@7.0.0
13250 silly saveTree         `-- camelcase@4.1.0
13251 verbose stack Error: spawn git ENOENT
13251 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
13251 verbose stack     at onErrorNT (internal/child_process.js:469:16)
13251 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)
13252 verbose cwd C:\Users\bluej\tistory_skin\MyApp
13253 verbose Windows_NT 10.0.17763
13254 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
13255 verbose node v13.5.0
13256 verbose npm  v6.13.4
13257 error code ENOENT
13258 error syscall spawn git
13259 error path git
13260 error errno -4058
13261 error enoent Error while executing:
13261 error enoent undefined ls-remote -h -t ssh://git@github.com/tidory/default-sidebar.git
13261 error enoent
13261 error enoent
13261 error enoent spawn git ENOENT
13262 error enoent This is related to npm not being able to find a file.
13263 verbose exit [ -4058, true ]

답변 4

·

답변을 작성해보세요.

0

bluejunha님의 프로필

bluejunha

질문자

2020.03.30

늦은 시간에 답변 감사합니다! 다음 강의 보면서 차근차근 따라 해보겠습니다.

0

브라우저가 텅 비어있는 것이 정상입니다.(!) 왜냐하면 @tidory/default-header, @tidory/default-sidebar 두 개의 의존성은 프로젝트에 있는 기본 예제코드이기 때문이죠. index.pug 와 같은 곳에 코드를 입력해서 확인 해보시면 어떨까요?

0

bluejunha님의 프로필

bluejunha

질문자

2020.03.29

일단, 개발환경은 똑같이 windows 10 이고, 관리자 권한으로 실행하여 작업하고 있습니다.

전역으로 설치했던 tidory 는 npm uninstall -g tidory 로 삭제 하였습니다.

# Tidory 7.2 ~

npx create-tidory-app my-app

# Move into the folder

cd my-app

# Install NPM Packages

npm install

npm install 과정에서 같은 에러를 마주치고나서, package-lock.json 삭제 하였습니다.

package.json 파일에서 @tidory/default-header, @tidory/default-sidebar 의존성 삭제하여 아래와 같습니다.

  "dependencies": {
    "tidory""^7.2"
 }

이후, 알려주신대로 프로젝트에서 @tidory 라고 적힌 부분 주석 처리 하였습니다.

app.js : // require('@tidory/default-sidebar')

Header.pug : //- include @tidory/default-header

Sidebar.pug : //- include @tidory/default-sidebar

npm install 시에 에러는 발생하지 않아서 npm start 명령어를 쳐보니,

실행은 되지만 브라우저에 아무것도 표시되지 않습니다.

(페이지 탭 이름에는 [##_page_title_##] 이라고 치환자가 뜨긴 하네요,,ㅠㅠ)

도와주세요~!

0

안녕하세요! 우선 글로벌로 설치된 tidory 는 지워주시고, 프로젝트 내부에서 npm install 로 패키지를 설치 한 뒤, npm start 로 개발 서버를 시작하는 것이 정상적인 루트입니다. install 과정에서 문제가 생겼다면, 충돌이 생겼거나 다른 이유일 수 있습니다. 저도 개발 환경은 windows 10 에서 해오고 있는데 이 에러는 저도 마주한 적이 없는 에러라서 당황스럽습니다.

혹시라도 안 된다면, package-lock.json 을 지워주시고, package.json 에 있는 종속성에서 tidory/default-sidebar, tidory/default-header 를 지우시고 다시 설치하신 뒤, 프로젝트에서 @tidory 가 쓰여있는 부분을 지워주세요.