npm없이 서버에 배포 할 노드 응용 프로그램을 패키징하고 있습니다. 내가 알아 낸 것 같아요 - npm을 사용하여 package.json 파일에 따라 로컬 node_modules 폴더에 모든 종속성을 설치했습니다.npm이 Contextify Release를 빌드하지 않습니다 - 노드 경로를 찾을 수 없습니까?
모두 제대로 작동하는 것으로 보이지만 서버에서 노드 파일을 실행하려고하면 Cannot find module '../build/Release/contextify'
이라는 문구가 나타납니다.
node_modules/.npm/contextify/0.0.4/package/lib/contextify.js
에서 해당 파일을 묻기 때문에 node_modules/.npm/contextify/0.0.4/package/build
에는 Release
이라는 디렉토리가 없습니다. 난 그냥 릴리스를 내장하지 않은 그 NPM을 가정, 그래서 나는 다시 dev에 기계로 전환하고, npm install
가 실행 - 그것은 불평하지 않았고, contextify 구축 출연 :
$ sudo npm install
> [email protected] preinstall /path/to/node/stuff/node_modules/contextify
> node-waf clean || true; node-waf configure build
'clean' finished successfully (0.014s)
Setting srcdir to : /path/to/node/stuff/node_modules/.npm/contextify/0.0.4/package
Setting blddir to : /path/to/node/stuff/node_modules/.npm/contextify/0.0.4/package/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr/local/Cellar/node/0.4.5
'configure' finished successfully (0.043s)
Waf: Entering directory `/path/to/node/stuff/node_modules/.npm/contextify/0.0.4/package/build'
[1/2] cxx: src/contextify.cc -> build/default/src/contextify_1.o
[2/2] cxx_link: build/default/src/contextify_1.o -> build/default/contextify.node
Waf: Leaving directory `/path/to/node/stuff/node_modules/.npm/contextify/0.0.4/package/build'
'build' finished successfully (0.370s)
불행하게도 package/build
디렉토리를 여전히 Release
폴더가 없습니다.
내 노드 경로가 설정되어 있지 않기 때문에 contextify가 빌드에 실패하는 경우입니다 (export NODE_PATH
을 시도했지만 도움이되지 않은 것 같음). 또는 다른 이유로 문맥 화가 그 건물을 짓지 않는 것처럼 보입니다.
어쩌면 나는 더 큰 것을 놓치고 있습니까? 나도 같은 문제가 발생하고
: https://github.com/brianmcd/contextify/issues/3 - 좋은 전화. – Jesse