2016-12-21 5 views
2

Ich wollte this page folgen, um JSBin lokal auszuführen.Installieren Sie JSBin lokal

Ich habe xcode 8.2 in meinem Mac installiert. Jetzt gibt npm -v3.10.9 zurück; node -v gibt v7.2.1 zurück.

Nach git clone [email protected]:remy/jsbin.git und cd jsbin, modifizierte ich package.json, so dass es "memcached": "2.2.2" innen (siehe this thread) hat, dann npm install kehrt

/Users/softtimur/Startup/WebProjects/tmp/jsbin$ npm install 
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 
npm WARN deprecated [email protected]: Deprecated, use jstransformer 
npm WARN deprecated [email protected]: use uuid module instead 
npm WARN deprecated [email protected]: Use `setimmediate` instead 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade 
npm WARN prefer global [email protected] should be installed with -g 
npm WARN prefer global [email protected] should be installed with -g 

> [email protected] install /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/sqlite3 
> node-pre-gyp install --fallback-to-build 

node-pre-gyp ERR! UNCAUGHT EXCEPTION 
node-pre-gyp ERR! stack Error: Cannot find module 'internal/fs' 
node-pre-gyp ERR! stack  at Function.Module._resolveFilename (module.js:470:15) 
node-pre-gyp ERR! stack  at Function.Module._load (module.js:418:25) 
node-pre-gyp ERR! stack  at Module.require (module.js:498:17) 
node-pre-gyp ERR! stack  at require (internal/module.js:20:19) 
node-pre-gyp ERR! stack  at evalmachine.<anonymous>:17:20 
node-pre-gyp ERR! stack  at Object.<anonymous> (/Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js:11:8) 
node-pre-gyp ERR! stack  at Module._compile (module.js:571:32) 
node-pre-gyp ERR! stack  at Object.Module._extensions..js (module.js:580:10) 
node-pre-gyp ERR! stack  at Module.load (module.js:488:32) 
node-pre-gyp ERR! stack  at tryModuleLoad (module.js:447:12) 
node-pre-gyp ERR! System Darwin 16.3.0 
node-pre-gyp ERR! command "/usr/local/Cellar/node/7.2.1/bin/node" "/Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 
node-pre-gyp ERR! cwd /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/sqlite3 
node-pre-gyp ERR! node -v v7.2.1 
node-pre-gyp ERR! node-pre-gyp -v v0.5.22 
node-pre-gyp ERR! This is a bug in `node-pre-gyp`. 
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help: 
node-pre-gyp ERR!  <https://github.com/mapbox/node-pre-gyp/issues> 
[email protected] /Users/softtimur/Startup/WebProjects/tmp/jsbin 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
├── [email protected] 
├── [email protected] 
├── UNMET PEER DEPENDENCY [email protected]>= 1.1.0-beta3 
...... 
...... 
...... 
npm WARN [email protected] requires a peer of [email protected]>= 1.1.0-beta3 but none was installed. 
npm WARN In [email protected] replacing bundled version of readable-stream with [email protected] 
npm ERR! Darwin 16.3.0 
npm ERR! argv "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/bin/npm" "install" 
npm ERR! node v7.2.1 
npm ERR! npm v3.10.9 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
npm ERR! Exit status 7 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. 
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 sqlite3 package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-pre-gyp install --fallback-to-build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs sqlite3 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls sqlite3 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/softtimur/Startup/WebProjects/tmp/jsbin/npm-debug.log 

Weiß jemand, was hier los?

Edit 1: Wenn ich "memcached": "2.2.2" und "sqlite3": "3.1.8" in package.json, setzen npm install kehrt:

/Users/softtimur/Startup/WebProjects/tmp/jsbin$ npm install 
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: Deprecated, use jstransformer 
npm WARN deprecated [email protected]: use uuid module instead 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: Use `setimmediate` instead 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade 
npm WARN prefer global [email protected] should be installed with -g 
npm WARN prefer global [email protected] should be installed with -g 

> [email protected] install /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/sqlite3 
> node-pre-gyp install --fallback-to-build 

[sqlite3] Success: "/Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/sqlite3/lib/binding/node-v51-darwin-x64/node_sqlite3.node" is installed via remote 

> [email protected] install /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/zmq 
> node-gyp rebuild 

Package libzmq was not found in the pkg-config search path. 
Perhaps you should add the directory containing `libzmq.pc' 
to the PKG_CONFIG_PATH environment variable 
No package 'libzmq' found 
gyp: Call to 'pkg-config libzmq --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 
gyp ERR! System Darwin 16.3.0 
gyp ERR! command "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/zmq 
gyp ERR! node -v v7.2.1 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok 

> [email protected] postinstall /Users/softtimur/Startup/WebProjects/tmp/jsbin 
> grunt build && npm run selenium:install 

Running "concat:dist" (concat) task 
File "public/js/prod/jsbin-3.40.2.js" created. 

Running "concat:runner" (concat) task 
File "public/js/prod/runner-3.40.2.js" created. 

Running "uglify:dist" (uglify) task 
File "public/js/prod/jsbin-3.40.2.min.js" created. 

Running "uglify:runner" (uglify) task 
File "public/js/prod/runner-3.40.2.min.js" created. 

Running "uglify:embed" (uglify) task 
File "public/js/embed.min.js" created. 

Running "uglify:addons" (uglify) task 
File "public/js/prod/addon-tern-3.40.2.min.js" created. 

Done, without errors. 

> [email protected] selenium:install /Users/softtimur/Startup/WebProjects/tmp/jsbin 
> selenium-standalone install 

---------- 
selenium-standalone installation starting 
---------- 

--- 
selenium install: 
from: https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar 
to: /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/selenium-standalone/.selenium/selenium-server/2.53.1-server.jar 
--- 
chrome install: 
from: https://chromedriver.storage.googleapis.com/2.25/chromedriver_mac64.zip 
to: /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/selenium-standalone/.selenium/chromedriver/2.25-x64-chromedriver 
--- 
firefox install: 
from: https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-macos.tar.gz 
to: /Users/softtimur/Startup/WebProjects/tmp/jsbin/node_modules/selenium-standalone/.selenium/geckodriver/0.11.1-x64-geckodriver 


selenium-standalone installation [=========   ] 43% 5.7s 

----- 
selenium-standalone installation finished 
----- 

> [email protected] prepublish /Users/softtimur/Startup/WebProjects/tmp/jsbin 
> npm run snyk-protect 


> [email protected] snyk-protect /Users/softtimur/Startup/WebProjects/tmp/jsbin 
> snyk protect 

Successfully applied Snyk patches 
[email protected] /Users/softtimur/Startup/WebProjects/tmp/jsbin 
├── [email protected] 
├── [email protected] 
├─┬ [email protected] 
│ ├─┬ [email protected] 
│ │ ├── [email protected] 
│ │ ├── [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├─┬ [email protected] 
│ │ └── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └─┬ [email protected] 
│ └── [email protected] 
├─┬ [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ ├── [email protected] 
│ └── [email protected] 
├── [email protected] 
├── [email protected] 
├── UNMET PEER DEPENDENCY [email protected]>= 1.1.0-beta3 
...... 
...... 
...... 
npm WARN [email protected] requires a peer of [email protected]>= 1.1.0-beta3 but none was installed. 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/zmq): 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild` 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 

Und npm start kehrt:

/Users/softtimur/Startup/WebProjects/tmp/jsbin$ npm start 

> [email protected] start /Users/softtimur/Startup/WebProjects/tmp/jsbin 
> (sleep 2 && open http://localhost:3000) & ./bin/jsbin 

Config from /Users/softtimur/Startup/WebProjects/tmp/jsbin/lib/config.local.json 
module.js:472 
    throw err; 
    ^

Error: Cannot find module 'express/node_modules/connect' 
    at Function.Module._resolveFilename (module.js:470:15) 
    at Function.Module._load (module.js:418:25) 
    at Module.require (module.js:498:17) 
    at require (internal/module.js:20:19) 
    at Object.<anonymous> (/Users/softtimur/Startup/WebProjects/tmp/jsbin/lib/middleware.js:4:15) 
    at Module._compile (module.js:571:32) 
    at Object.Module._extensions..js (module.js:580:10) 
    at Module.load (module.js:488:32) 
    at tryModuleLoad (module.js:447:12) 
    at Function.Module._load (module.js:439:3) 

npm ERR! Darwin 16.3.0 
npm ERR! argv "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v7.2.1 
npm ERR! npm v3.10.9 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] start: `(sleep 2 && open http://localhost:3000) & ./bin/jsbin` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] start script '(sleep 2 && open http://localhost:3000) & ./bin/jsbin'. 
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 jsbin package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  (sleep 2 && open http://localhost:3000) & ./bin/jsbin 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs jsbin 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls jsbin 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /Users/softtimur*emphasized text*/Startup/WebProjects/tmp/jsbin/npm-debug.log 

Edit 2:

mscdex Kommentar Nach der folgenden Aktionen gelöst libzmq Fehler:

  1. installieren ZMQ Gebräu mit: brew install zmq
  2. export PKG_CONFIG_PATH=/usr/local/Cellar/zeromq/4.2.0/lib/pkgconfig/
  3. sudo visudo und fügen Defaults env_keep += "PKG_CONFIG_PATH"
  4. gesetzt zmq zu 2.15.3 in package.json

Die express/node_modules/connect wurde infest codiert. Ich habe express/node_modules/connect zu connect geändert, es funktioniert schließlich.

Antwort

1

Wahrscheinlich sqlite3 muss auf die neueste Version aktualisiert werden, für die eine neuere node-pre-gyp Abhängigkeit aufweist, die wiederum sollten seine eigenen aktualisierten Abhängigkeiten richtig von Knoten mit modernen Versionen zu arbeiten.

Die libzmq-Fehler treten auf, weil Sie nicht die entsprechenden libzmq-Pakete installiert haben, gegen die Sie bauen können.

Die Nachricht Error: Cannot find module 'express/node_modules/connect' ist höchstwahrscheinlich darauf zurückzuführen, dass npm v3 geändert hat, wie Module gespeichert werden können (um eine tiefe Verschachtelung zu reduzieren). Es scheint, dass jsbin eine Annahme darüber macht, wo die express Abhängigkeiten liegen, indem ein Pfad fest codiert wird, anstatt die richtige Modulauflösung zu verwenden.

+0

Ich legte '" sqlite3 ":" 3.1.8 "' in 'package.json', es hat geholfen. Aber neuer Fehler über 'libzmq' ausgelöst, siehe mein Update ... – SoftTimur

+0

Ich habe meine Antwort aktualisiert. – mscdex

Verwandte Themen