2016-04-06 8 views
5

Ich versuche, logary-js von einem Projekt von mir zu referenzieren.npm-Paket von GitHub, fehlende Dateien

Ich habe diese packages.json Datei:

... 
"dependencies": { 
    "logary": "logary/logary-js#master", 
    ... 
} 
... 

Wenn jedoch das Paket nach unten zu ziehen versuchen, schlägt es mit diesem Fehler:

✗ npm install 

> [email protected] preinstall /Users/h/dev/proj/node_modules/.staging/logary-6603d70a 
> npm run build 


> [email protected] build /Users/h/dev/proj/node_modules/.staging/logary-6603d70a 
> NODE_ENV=production webpack --progress --color --display-error-details --display-reasons --optimize-minimize 

webpack 1.12.14 
Usage: https://webpack.github.io/docs/cli.html 

Options: 
    --help, -h, -? 
    --config 
    --context 
    --entry 
    --module-bind 
    --module-bind-post 
    --module-bind-pre 
    --output-path 
    --output-file 
    --output-chunk-file 
    --output-named-chunk-file 
    --output-source-map-file 
    --output-public-path 
    --output-jsonp-function 
    --output-pathinfo 
    --output-library 
    --output-library-target 
    --records-input-path 
    --records-output-path 
    --records-path 
    --define 
    --target 
    --cache                       [default: true] 
    --watch, -w 
    --watch which closes when stdin ends 
    --watch-aggregate-timeout 
    --watch-poll 
    --hot 
    --debug 
    --devtool 
    --progress 
    --resolve-alias 
    --resolve-loader-alias 
    --optimize-max-chunks 
    --optimize-min-chunk-size 
    --optimize-minimize 
    --optimize-occurence-order 
    --optimize-dedupe 
    --prefetch 
    --provide 
    --labeled-modules 
    --plugin 
    --bail 
    --profile 
    -d         shortcut for --debug --devtool sourcemap --output-pathinfo 
    -p         shortcut for --optimize-minimize 
    --json, -j 
    --colors, -c 
    --sort-modules-by 
    --sort-chunks-by 
    --sort-assets-by 
    --hide-modules 
    --display-exclude 
    --display-modules 
    --display-chunks 
    --display-error-details 
    --display-origins 
    --display-cached 
    --display-cached-assets 
    --display-reasons, --verbose, -v 

Output filename not configured. 

npm ERR! Darwin 14.5.0 
npm ERR! argv "/Users/h/.nvm/versions/node/v5.6.0/bin/node" "/Users/h/.nvm/versions/node/v5.6.0/bin/npm" "run" "build" 
npm ERR! node v5.6.0 
npm ERR! npm v3.6.0 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] build: `NODE_ENV=production webpack --progress --color --display-error-details --display-reasons --optimize-minimize` 
npm ERR! Exit status 255 
npm ERR! 
npm ERR! Failed at the [email protected] build script 'NODE_ENV=production webpack --progress --color --display-error-details --display-reasons --optimize-minimize'. 

, die einen Fehler, den Sie erhalten, ist, wenn es Keine Datei webpack.config.js im Verzeichnis. Das lässt mich glauben, dass npm nur ein paar Dateien herunterzieht. NPM-debug.log sagt:

89 verbose tar unpack /Users/h/.npm/logary/1.0.0/package.tgz 
90 verbose tar unpacking to /Users/h/dev/proj/node_modules/.staging/logary-6603d70a 
91 silly gentlyRm /Users/h/dev/proj/node_modules/.staging/logary-6603d70a is being purged 
92 verbose gentlyRm don't care about contents; nuking /Users/h/dev/proj/node_modules/.staging/logary 
-6603d70a 
93 silly gunzTarPerm modes [ '770', '660' ] 
94 silly gunzTarPerm extractEntry package.json 
95 silly gunzTarPerm extractEntry README.md 
96 silly gunzTarPerm extractEntry LICENSE 
97 silly gentlyRm /Users/h/dev/proj/node_modules/.staging/logary-6603d70a/node_modules is being purg 
ed 
98 verbose gentlyRm don't care about contents; nuking /Users/h/dev/proj/node_modules/.staging/logary 
-6603d70a/node_modules 
99 silly doParallel preinstall 1 
100 silly preinstall [email protected] /Users/h/dev/proj/node_modules/.staging/logary-6603d70a 
101 info lifecycle [email protected]~preinstall: [email protected] 

Auch in diesem Beispiel https://github.com/logary/logary-js/tree/master/examples/webpack es Referenzierung logary ganz gut, wenn auch über das Dateisystem statt GitHub.

So wird die Frage; wie referenziere ich logarithmus von github? Oder was soll ich in seiner package.json Datei ändern, damit es funktioniert?

+0

Gibt es einen Grund, warum Sie die Version nicht in npm verwenden? – Andy

+1

Ja, es ist meine eigene Bibliothek und ich möchte es in meiner eigenen Software behalten. – Henrik

Antwort

0

Sie können ein Knotenpaket von GitHub mit der Syntax npm install --save https://github.com/{USER}/{REPO}/tarball/{BRANCH} installieren. Sie können dies auch überprüfen answer, es hat gute Tipps dazu.

Verwandte Themen