2017-02-15 1 views
1

node package-manager에서 지원하는 로컬 호스트 프로덕션에서 사용자 정의 WordPress 설치에 대한 루틴 테스트를 시도하고 있습니다. WordPress 코어 파일을 인스턴스화하고 데이터베이스에 성공적으로 연결하고 자산을 업데이트 한 후 해당 WordPress 테마 파일로 디렉토리를 변경하여 npm install과 함께 node-package-manager 설치 명령을 실행하려고 시도했습니다 (성공적 이었음). 그런 다음 루틴에 따라 npm run build으로 CSS 컴파일러를 실행하려고 시도했습니다. 그러나, 이러한 시도에, 나는 내 아래 터미널 출력 내에서 다음과 같은 오류가 발생했습니다 : 나는 npm install -g npm와 노드 패키지 관리자 모두를 업데이트하려고했습니다npm 빌드 오류가 발생했습니다. 해당 파일이나 디렉토리가 없습니다. 'build/bundle.css'를 엽니 다.

vetsi npm run build 

> @ build /Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi 
> npm-run-all --silent compile:css compile:js 

/Users/alexsingleton/Sites/vetsi/wp-content/themes/vetsi/node_modules/stylus/bin/stylus:715 
    if (err) throw err; 
      ^

Error: ENOENT: no such file or directory, open 'build/bundle.css' 
    at Error (native) 
ERROR: compile:css: None-Zero Exit(1); 

npm ERR! Darwin 16.4.0 
npm ERR! argv "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/node" "/Users/alexsingleton/.nvm/versions/node/v4.4.4/bin/npm" "run" "build" 
npm ERR! node v4.4.4 
npm ERR! npm v4.2.0 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! @ build: `npm-run-all --silent compile:css compile:js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the @ build script 'npm-run-all --silent compile:css compile:js'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  npm-run-all --silent compile:css compile:js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/alexsingleton/.npm/_logs/2017-02-15T17_48_20_907Z-debug.log 
➜ vetsi 

nvm ls 생성과 또 다른 성공적인 로컬 호스트 생산에 해당하는 올바른 버전을 확인 아래의 출력 :

vetsi nvm ls 
     v0.12.7 
->  v4.4.4 
     system 
default -> 4.4.4 (-> v4.4.4) 
node -> stable (-> v4.4.4) (default) 
stable -> 4.4 (-> v4.4.4) (default) 
iojs -> iojs- (-> N/A) (default) 
➜ vetsi 

없이 내가 성공적으로 액세스하고 워드 프레스 콘텐츠 관리 시스템 내에서 탐색 할 수 있지만, 상기 오류, 렌더링에서 모든 로컬 호스트 페이지를 배제, 말을. 나는 어떤 지침을 주셔서 감사합니다 - 고마워요!

답변

0

Google 크롬 검사기 도구의 콘솔에서 로컬 호스트 제작을 조사한 결과 전체에서 node package-manager folder and dependencies이 누락되었다고보고되었습니다. npm-installnpm build도 패키지 폴더 나 종속성을 인스턴스화하지 않았으므로 다른 로컬 호스트 생산 (특히 bundle.css)에서 해당 파일을 복사했습니다. wp/themes/vetsi/빌드). 지금은이 해킹이 내 문제에 대한 최선의 해결책이지만 이전 분석 결과가 이전 성공에 따라 올바르게 실행되지 않은 이유에 대한 대체 분석 또는 설명을 환영합니다. 감사!

관련 문제