zotero / zotero-standalone-build

Zotero client build utility
https://www.zotero.org/support/dev/client_coding/building_the_standalone_client
Other
120 stars 98 forks source link

Building the Zotero Client : npm run build error #55

Closed gracile-fr closed 7 years ago

gracile-fr commented 7 years ago

I'm on Win7 64-bit, following latest instructions on https://www.zotero.org/support/dev/client_coding/building_the_standalone_client If someone can help, I'd be grateful.

/cygdrive/c/Dev Zotero/Git/build/zotero-client $ npm i npm WARN prefer global node-gyp@3.6.2 should be installed with -g

node-sass@4.5.3 install C:\Dev Zotero\Git\build\zotero-client\node_modules\nod e-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5 .3/win32-x64-48_binding.node Download complete Binary saved to C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass\ven dor\win32-x64-48\binding.node Caching binary to C:\Users\Gracile\AppData\Roaming\npm-cache\node-sass\4.5.3\wi n32-x64-48_binding.node

node-sass@4.5.3 postinstall C:\Dev Zotero\Git\build\zotero-client\node_modules \node-sass node scripts/build.js

Binary found at C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass\ven dor\win32-x64-48\binding.node Testing binary Binary is fine zotero@5.0.0 C:\Dev Zotero\Git\build\zotero-client +-- babel-core@6.25.0 | +-- babel-code-frame@6.22.0 | | +-- esutils@2.0.2 | | -- js-tokens@3.0.2 | +-- babel-generator@6.25.0 | | +-- detect-indent@4.0.0 | | |-- repeating@2.0.1 | | | -- is-finite@1.0.2 | | |-- number-is-nan@1.0.1 | | +-- jsesc@1.3.0 | | -- trim-right@1.0.1 | +-- babel-helpers@6.24.1 | +-- babel-messages@6.23.0 | +-- babel-register@6.24.1 | | +-- core-js@2.4.1 | | +-- home-or-tmp@2.0.0 | | | +-- os-homedir@1.0.2 | | |-- os-tmpdir@1.0.2 | | -- source-map-support@0.4.15 | +-- babel-runtime@6.23.0 | | +-- core-js@2.4.1 | |-- regenerator-runtime@0.10.5 | +-- babel-template@6.25.0 | +-- babel-traverse@6.25.0 | | +-- globals@9.18.0 | | -- invariant@2.2.2 | +-- babel-types@6.25.0 | |-- to-fast-properties@1.0.3 | +-- babylon@6.17.4 | +-- convert-source-map@1.5.0 | +-- debug@2.6.8 | | -- ms@2.0.0 | +-- json5@0.5.1 | +-- lodash@4.17.4 | +-- minimatch@3.0.4 | |-- brace-expansion@1.1.8 | | +-- balanced-match@1.0.0 | | -- concat-map@0.0.1 | +-- path-is-absolute@1.0.1 | +-- private@0.1.7 | +-- slash@1.0.0 |-- source-map@0.5.6 +-- babel-plugin-syntax-async-generators@6.13.0 +-- babel-plugin-syntax-class-properties@6.13.0 +-- babel-plugin-syntax-decorators@6.13.0 +-- babel-plugin-syntax-do-expressions@6.13.0 +-- babel-plugin-syntax-export-extensions@6.13.0 +-- babel-plugin-syntax-flow@6.18.0 +-- babel-plugin-syntax-jsx@6.18.0 +-- babel-plugin-syntax-object-rest-spread@6.13.0 +-- babel-plugin-transform-async-to-module-method@6.24.1 | +-- babel-helper-remap-async-to-generator@6.24.1 | | -- babel-helper-function-name@6.24.1 | |-- babel-helper-get-function-arity@6.24.1 | -- babel-plugin-syntax-async-functions@6.13.0 +-- babel-plugin-transform-es2015-modules-commonjs@6.24.1 |-- babel-plugin-transform-strict-mode@6.24.1 +-- babel-preset-react@6.24.1 | +-- babel-plugin-transform-react-display-name@6.25.0 | +-- babel-plugin-transform-react-jsx@6.24.1 | | -- babel-helper-builder-react-jsx@6.24.1 | +-- babel-plugin-transform-react-jsx-self@6.22.0 | +-- babel-plugin-transform-react-jsx-source@6.22.0 |-- babel-preset-flow@6.23.0 | -- babel-plugin-transform-flow-strip-types@6.22.0 +-- bluebird@3.5.0 +-- browserify@14.4.0 | +-- assert@1.4.1 | +-- browser-pack@6.0.2 | | +-- combine-source-map@0.7.2 | | | +-- convert-source-map@1.1.3 | | | +-- inline-source-map@0.6.2 | | |-- lodash.memoize@3.0.4 | | -- umd@3.0.1 | +-- browser-resolve@1.11.2 | |-- resolve@1.1.7 | +-- browserify-zlib@0.1.4 | | -- pako@0.2.9 | +-- buffer@5.0.6 | | +-- base64-js@1.2.1 | |-- ieee754@1.1.8 | +-- cached-path-relative@1.0.1 | +-- concat-stream@1.5.2 | | +-- readable-stream@2.0.6 | | | -- string_decoder@0.10.31 | |-- typedarray@0.0.6 | +-- console-browserify@1.1.0 | | -- date-now@0.1.4 | +-- constants-browserify@1.0.0 | +-- crypto-browserify@3.11.0 | | +-- browserify-cipher@1.0.0 | | | +-- browserify-aes@1.0.6 | | | |-- buffer-xor@1.0.3 | | | +-- browserify-des@1.0.0 | | | | -- des.js@1.0.0 | | |-- evp_bytestokey@1.0.0 | | +-- browserify-sign@4.0.4 | | | +-- bn.js@4.11.7 | | | +-- browserify-rsa@4.0.1 | | | +-- elliptic@6.4.0 | | | | +-- brorand@1.1.0 | | | | +-- hash.js@1.1.3 | | | | +-- hmac-drbg@1.0.1 | | | | +-- minimalistic-assert@1.0.0 | | | | -- minimalistic-crypto-utils@1.0.1 | | |-- parse-asn1@5.1.0 | | | -- asn1.js@4.9.1 | | +-- create-ecdh@4.0.0 | | +-- create-hash@1.1.3 | | | +-- cipher-base@1.0.3 | | |-- ripemd160@2.0.1 | | | -- hash-base@2.0.2 | | +-- create-hmac@1.1.6 | | +-- diffie-hellman@5.0.2 | | |-- miller-rabin@4.0.0 | | +-- pbkdf2@3.0.12 | | +-- public-encrypt@4.0.0 | | -- randombytes@2.0.5 | +-- defined@1.0.0 | +-- deps-sort@2.0.0 | +-- domain-browser@1.1.7 | +-- duplexer2@0.1.4 | +-- events@1.1.1 | +-- glob@7.1.2 | | +-- fs.realpath@1.0.0 | | +-- inflight@1.0.6 | | |-- wrappy@1.0.2 | | -- once@1.4.0 | +-- has@1.0.1 | |-- function-bind@1.1.0 | +-- htmlescape@1.1.1 | +-- https-browserify@1.0.0 | +-- inherits@2.0.3 | +-- insert-module-globals@7.0.1 | | +-- is-buffer@1.1.5 | | -- lexical-scope@1.2.0 | |-- astw@2.2.0 | +-- JSONStream@1.3.1 | | +-- jsonparse@1.3.1 | | -- through@2.3.8 | +-- labeled-stream-splicer@2.0.0 | | +-- isarray@0.0.1 | |-- stream-splicer@2.0.0 | +-- module-deps@4.1.1 | | +-- detective@4.5.0 | | -- stream-combiner2@1.1.1 | +-- os-browserify@0.1.2 | +-- parents@1.0.1 | |-- path-platform@0.11.15 | +-- path-browserify@0.0.0 | +-- process@0.11.10 | +-- punycode@1.4.1 | +-- querystring-es3@0.2.1 | +-- read-only-stream@2.0.0 | +-- readable-stream@2.3.3 | | +-- core-util-is@1.0.2 | | +-- isarray@1.0.0 | | +-- process-nextick-args@1.0.7 | | +-- safe-buffer@5.1.1 | | -- util-deprecate@1.0.2 | +-- resolve@1.3.3 | |-- path-parse@1.0.5 | +-- shasum@1.0.2 | | +-- json-stable-stringify@0.0.1 | | -- sha.js@2.4.8 | +-- shell-quote@1.6.1 | | +-- array-filter@0.0.1 | | +-- array-map@0.0.0 | | +-- array-reduce@0.0.0 | |-- jsonify@0.0.0 | +-- stream-browserify@2.0.1 | +-- stream-http@2.7.2 | | +-- builtin-status-codes@3.0.0 | | -- to-arraybuffer@1.0.1 | +-- string_decoder@1.0.3 | +-- subarg@1.0.0 | |-- minimist@1.2.0 | +-- syntax-error@1.3.0 | | -- acorn@4.0.13 | +-- through2@2.0.3 | +-- timers-browserify@1.4.2 | +-- tty-browserify@0.0.0 | +-- url@0.11.0 | | +-- punycode@1.3.2 | |-- querystring@0.2.0 | +-- util@0.10.3 | | -- inherits@2.0.1 | +-- vm-browserify@0.0.4 | |-- indexof@0.0.1 | -- xtend@4.0.1 +-- chai@3.5.0 | +-- assertion-error@1.0.2 | +-- deep-eql@0.1.3 | |-- type-detect@0.1.1 | -- type-detect@1.0.0 +-- chai-as-promised@6.0.0 |-- check-error@1.0.2 +-- chokidar@1.7.0 | +-- anymatch@1.3.0 | | -- micromatch@2.3.11 | | +-- arr-diff@2.0.0 | | |-- arr-flatten@1.1.0 | | +-- array-unique@0.2.1 | | +-- braces@1.8.5 | | | +-- expand-range@1.8.2 | | | | -- fill-range@2.2.3 | | | | +-- is-number@2.1.0 | | | | +-- isobject@2.1.0 | | | | +-- randomatic@1.1.7 | | | | | +-- is-number@3.0.0 | | | | | |-- kind-of@3.2.2 | | | | | -- kind-of@4.0.0 | | | |-- repeat-string@1.6.1 | | | +-- preserve@0.2.0 | | | -- repeat-element@1.1.2 | | +-- expand-brackets@0.1.5 | | |-- is-posix-bracket@0.1.1 | | +-- extglob@0.3.2 | | +-- filename-regex@2.0.1 | | +-- kind-of@3.2.2 | | +-- normalize-path@2.1.1 | | | -- remove-trailing-separator@1.0.2 | | +-- object.omit@2.0.1 | | | +-- for-own@0.1.5 | | | |-- for-in@1.0.2 | | | -- is-extendable@0.1.1 | | +-- parse-glob@3.0.4 | | | +-- glob-base@0.3.0 | | |-- is-dotfile@1.0.3 | | -- regex-cache@0.4.3 | | +-- is-equal-shallow@0.1.3 | |-- is-primitive@2.0.0 | +-- async-each@1.0.1 | +-- glob-parent@2.0.0 | +-- is-binary-path@1.0.1 | | -- binary-extensions@1.8.0 | +-- is-glob@2.0.1 | |-- is-extglob@1.0.0 | -- readdirp@2.1.0 |-- set-immediate-shim@1.0.1 +-- co-mocha@1.2.0 | +-- co@4.6.0 | -- is-generator@1.0.3 +-- colors@1.1.2 +-- UNMET PEER DEPENDENCY eslint@^3.0.0 || ^4.0.0 +-- eslint-plugin-react@7.1.0 | +-- doctrine@2.0.0 |-- jsx-ast-utils@1.4.1 +-- fs-extra@3.0.1 | +-- graceful-fs@4.1.11 | -- jsonfile@3.0.1 +-- globby@6.1.0 | +-- array-union@1.0.2 | |-- array-uniq@1.0.3 | +-- object-assign@4.1.1 | +-- pify@2.3.0 | -- pinkie-promise@2.0.1 |-- pinkie@2.0.4 +-- mocha@3.4.2 | +-- browser-stdout@1.3.0 | +-- commander@2.9.0 | | -- graceful-readlink@1.0.1 | +-- debug@2.6.0 | |-- ms@0.7.2 | +-- diff@3.2.0 | +-- escape-string-regexp@1.0.5 | +-- glob@7.1.1 | +-- growl@1.9.2 | +-- json3@3.3.2 | +-- lodash.create@3.1.1 | | +-- lodash._baseassign@3.2.0 | | | +-- lodash._basecopy@3.0.1 | | | -- lodash.keys@3.1.2 | | | +-- lodash._getnative@3.9.1 | | | +-- lodash.isarguments@3.1.0 | | |-- lodash.isarray@3.0.4 | | +-- lodash._basecreate@3.0.3 | | -- lodash._isiterateecall@3.0.9 | +-- mkdirp@0.5.1 | |-- minimist@0.0.8 | -- supports-color@3.1.2 |-- has-flag@1.0.0 +-- multimatch@2.1.0 | +-- array-differ@1.0.0 | -- arrify@1.0.1 +-- node-sass@4.5.3 | +-- async-foreach@0.1.3 | +-- chalk@1.1.3 | | +-- ansi-styles@2.2.1 | | +-- has-ansi@2.0.0 | | |-- ansi-regex@2.1.1 | | +-- strip-ansi@3.0.1 | | -- supports-color@2.0.0 | +-- cross-spawn@3.0.1 | | +-- lru-cache@4.1.1 | | | +-- pseudomap@1.0.2 | | |-- yallist@2.1.2 | | -- which@1.2.14 | |-- isexe@2.0.0 | +-- gaze@1.1.2 | | -- globule@1.2.0 | +-- get-stdin@4.0.1 | +-- in-publish@2.0.0 | +-- lodash.assign@4.2.0 | +-- lodash.clonedeep@4.5.0 | +-- lodash.mergewith@4.6.0 | +-- meow@3.7.0 | | +-- camelcase-keys@2.1.0 | | |-- camelcase@2.1.1 | | +-- decamelize@1.2.0 | | +-- loud-rejection@1.6.0 | | | +-- currently-unhandled@0.4.1 | | | | -- array-find-index@1.0.2 | | |-- signal-exit@3.0.2 | | +-- map-obj@1.0.1 | | +-- minimist@1.2.0 | | +-- normalize-package-data@2.4.0 | | | +-- hosted-git-info@2.5.0 | | | +-- is-builtin-module@1.0.0 | | | | -- builtin-modules@1.1.1 | | |-- validate-npm-package-license@3.0.1 | | | +-- spdx-correct@1.0.2 | | | | -- spdx-license-ids@1.2.2 | | |-- spdx-expression-parse@1.0.4 | | +-- read-pkg-up@1.0.1 | | | +-- find-up@1.1.2 | | | | -- path-exists@2.1.0 | | |-- read-pkg@1.1.0 | | | +-- load-json-file@1.1.0 | | | | +-- parse-json@2.2.0 | | | | | -- error-ex@1.3.1 | | | | |-- is-arrayish@0.2.1 | | | | -- strip-bom@2.0.0 | | | |-- is-utf8@0.2.1 | | | -- path-type@1.1.0 | | +-- redent@1.0.0 | | | +-- indent-string@2.1.0 | | |-- strip-indent@1.0.1 | | -- trim-newlines@1.0.0 | +-- nan@2.6.2 | +-- node-gyp@3.6.2 | | +-- fstream@1.0.11 | | +-- nopt@3.0.6 | | |-- abbrev@1.1.0 | | +-- osenv@0.1.4 | | +-- rimraf@2.6.1 | | +-- semver@5.3.0 | | -- tar@2.2.1 | |-- block-stream@0.0.9 | +-- npmlog@4.1.2 | | +-- are-we-there-yet@1.1.4 | | | -- delegates@1.0.0 | | +-- console-control-strings@1.1.0 | | +-- gauge@2.7.4 | | | +-- aproba@1.1.2 | | | +-- has-unicode@2.0.1 | | | +-- string-width@1.0.2 | | | | +-- code-point-at@1.1.0 | | | |-- is-fullwidth-code-point@1.0.0 | | | -- wide-align@1.1.2 | |-- set-blocking@2.0.0 | +-- request@2.81.0 | | +-- aws-sign2@0.6.0 | | +-- aws4@1.6.0 | | +-- caseless@0.12.0 | | +-- combined-stream@1.0.5 | | | -- delayed-stream@1.0.0 | | +-- extend@3.0.1 | | +-- forever-agent@0.6.1 | | +-- form-data@2.1.4 | | |-- asynckit@0.4.0 | | +-- har-validator@4.2.1 | | | +-- ajv@4.11.8 | | | | -- json-stable-stringify@1.0.1 | | |-- har-schema@1.0.5 | | +-- hawk@3.1.3 | | | +-- boom@2.10.1 | | | +-- cryptiles@2.0.5 | | | +-- hoek@2.16.3 | | | -- sntp@1.0.9 | | +-- http-signature@1.1.1 | | | +-- assert-plus@0.2.0 | | | +-- jsprim@1.4.0 | | | | +-- assert-plus@1.0.0 | | | | +-- extsprintf@1.0.2 | | | | +-- json-schema@0.2.3 | | | |-- verror@1.3.6 | | | -- sshpk@1.13.1 | | | +-- asn1@0.2.3 | | | +-- assert-plus@1.0.0 | | | +-- bcrypt-pbkdf@1.0.1 | | | +-- dashdash@1.14.1 | | | |-- assert-plus@1.0.0 | | | +-- ecc-jsbn@0.1.1 | | | +-- getpass@0.1.7 | | | | -- assert-plus@1.0.0 | | | +-- jsbn@0.1.1 | | |-- tweetnacl@0.14.5 | | +-- is-typedarray@1.0.0 | | +-- isstream@0.1.2 | | +-- json-stringify-safe@5.0.1 | | +-- mime-types@2.1.15 | | | -- mime-db@1.27.0 | | +-- oauth-sign@0.8.2 | | +-- performance-now@0.2.0 | | +-- qs@6.4.0 | | +-- stringstream@0.0.5 | | +-- tough-cookie@2.3.2 | | +-- tunnel-agent@0.6.0 | |-- uuid@3.1.0 | +-- sass-graph@2.2.4 | | +-- scss-tokenizer@0.2.3 | | | +-- js-base64@2.1.9 | | | -- source-map@0.4.4 | | |-- amdefine@1.0.1 | | -- yargs@7.1.0 | | +-- camelcase@3.0.0 | | +-- cliui@3.2.0 | | |-- wrap-ansi@2.1.0 | | +-- get-caller-file@1.0.2 | | +-- os-locale@1.4.0 | | | -- lcid@1.0.0 | | |-- invert-kv@1.0.0 | | +-- require-directory@2.1.1 | | +-- require-main-filename@1.0.1 | | +-- which-module@1.0.0 | | +-- y18n@3.2.1 | | -- yargs-parser@5.0.0 | |-- camelcase@3.0.0 | -- stdout-stream@1.4.0 +-- react@15.6.1 | +-- create-react-class@15.6.0 | +-- fbjs@0.8.12 | | +-- core-js@1.2.7 | | +-- isomorphic-fetch@2.2.1 | | |-- whatwg-fetch@2.0.3 | | +-- promise@7.3.1 | | | -- asap@2.0.5 | | +-- setimmediate@1.0.5 | |-- ua-parser-js@0.7.13 | +-- loose-envify@1.3.1 | -- prop-types@15.5.10 +-- react-dom@15.6.1 +-- sinon@2.3.6 | +-- formatio@1.2.0 | +-- lolex@1.6.0 | +-- native-promise-only@0.8.1 | +-- path-to-regexp@1.7.0 | |-- isarray@0.0.1 | +-- samsam@1.2.1 | +-- text-encoding@0.6.4 | -- type-detect@4.0.3 +-- universalify@0.1.0 -- zotero-web-library@0.9.4-alpha +-- bootstrap-sass@3.3.7 +-- floatthead@1.4.0 +-- history@2.1.2 | +-- deep-equal@1.0.1 | +-- query-string@3.0.3 | | -- strict-uri-encode@1.1.0 |-- warning@2.1.0 +-- jquery@2.2.4 +-- libzotero@0.1.13 | +-- es6-promise@3.3.1 | +-- node-fetch@1.7.1 | | +-- encoding@0.1.12 | | | -- iconv-lite@0.4.18 | |-- is-stream@1.1.0 | +-- spark-md5@2.0.2 | +-- striptags@2.2.1 | -- whatwg-fetch@1.1.1 +-- react-redux@4.4.8 |-- hoist-non-react-statics@1.2.0 +-- react-router@2.8.1 | -- warning@3.0.0 +-- redux@3.7.1 | +-- lodash-es@4.17.4 |-- symbol-observable@1.0.4 +-- redux-logger@2.10.2 | -- deep-diff@0.3.4 +-- redux-promise@0.5.3 |-- flux-standard-action@0.6.1 | -- lodash.isplainobject@3.2.0 | +-- lodash._basefor@3.0.3 |-- lodash.keysin@3.0.8 +-- redux-router@2.1.2 +-- redux-thunk@2.2.0 `-- w3c-xmlhttprequest@2.1.2

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch okidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} ) npm WARN eslint-plugin-react@7.1.0 requires a peer of eslint@^3.0.0 || ^4.0.0 bu t none was installed.

/cygdrive/c/Dev Zotero/Git/build/zotero-client $ npm run build

zotero@5.0.0 build C:\Dev Zotero\Git\build\zotero-client node ./scripts/build.js

C:\Dev Zotero\Git\build\zotero-client\scripts\build.js:12 (async () => { ^ SyntaxError: Unexpected token ( at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:389:7) at startup (bootstrap_node.js:149:9)

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build" npm ERR! node v6.11.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! zotero@5.0.0 build: node ./scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the zotero@5.0.0 build script 'node ./scripts/build.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 zotero package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./scripts/build.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs zotero npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls zotero npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\Dev Zotero\Git\build\zotero-client\npm-debug.log

dstillman commented 7 years ago

Use Node 8.

gracile-fr commented 7 years ago

Thank you for your quick reply. What about that?

/cygdrive/c/Dev Zotero/Git/build/zotero-client
$ npm i

> fsevents@1.1.2 install C:\Dev Zotero\Git\build\zotero-client\node_modules\fsev                                                                                        ents
> node install

npm WARN eslint-plugin-react@7.1.0 requires a peer of eslint@^3.0.0 || ^4.0.0 bu                                                                                        t none was installed.

added 115 packages, removed 22 packages and updated 16 packages in 11.039s

/cygdrive/c/Dev Zotero/Git/build/zotero-client
$ npm run build

> zotero@5.0.0 build C:\Dev Zotero\Git\build\zotero-client
> node ./scripts/build.js

C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass\lib\binding.js:15
      throw new Error(errors.missingBinary());
      ^

Error: Missing binding C:\Dev Zotero\Git\build\zotero-client\node_modules\node-s                                                                                        ass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit                                                                                         with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 6.x

This usually happens because your environment has changed since running `npm ins                                                                                        tall`.
Run `npm rebuild node-sass --force` to build the binding for your current enviro                                                                                        nment.
    at module.exports (C:\Dev Zotero\Git\build\zotero-client\node_modules\node-s                                                                                        ass\lib\binding.js:15:13)
    at Object.<anonymous> (C:\Dev Zotero\Git\build\zotero-client\node_modules\no                                                                                        de-sass\lib\index.js:14:35)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Dev Zotero\Git\build\zotero-client\scripts\sass.js                                                                                        :4:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zotero@5.0.0 build: `node ./scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zotero@5.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional log                                                                                        ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Gracile\AppData\Roaming\npm-cache\_logs\2017-07-06T16_22_                                                                                        02_405Z-debug.log

/cygdrive/c/Dev Zotero/Git/build/zotero-client
$ npm rebuild node-sass --force

npm WARN using --force I sure hope you know what you are doing.

> node-sass@4.5.3 install C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass
> node scripts/install.js

module.js:487
    throw err;
    ^

Error: Cannot find module 'are-we-there-yet'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Dev Zotero\Git\build\zotero-client\node_modules\npmlog\log.js:2:16)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

> node-sass@4.5.3 postinstall C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass
> node scripts/build.js

Building: C:\Program Files\nodejs\node.exe C:\Dev Zotero\Git\build\zotero-client\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
module.js:487
    throw err;
    ^

Error: Cannot find module 'are-we-there-yet'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Dev Zotero\Git\build\zotero-client\node_modules\npmlog\log.js:2:16)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
Build failed with error code: 1
node-sass@4.5.3 C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass

/cygdrive/c/Dev Zotero/Git/build/zotero-client
$ npm run build

> zotero@5.0.0 build C:\Dev Zotero\Git\build\zotero-client
> node ./scripts/build.js

C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass\lib\binding.js:15
      throw new Error(errors.missingBinary());
      ^

Error: Missing binding C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass\vendor\win32-x64-57\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 64-bit with Node.js 6.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
    at module.exports (C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> (C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Dev Zotero\Git\build\zotero-client\scripts\sass.js:4:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zotero@5.0.0 build: `node ./scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zotero@5.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Gracile\AppData\Roaming\npm-cache\_logs\2017-07-06T16_23_48_175Z-debug.log
dstillman commented 7 years ago

Delete node_modules and run npm i again with the newer Node/NPM.

gracile-fr commented 7 years ago

Not sure it worked.

/cygdrive/c/Dev Zotero/Git/build/zotero-client
$ rm -rf node_modules

/cygdrive/c/Dev Zotero/Git/build/zotero-client
$ npm i
npm WARN prefer global node-gyp@3.6.2 should be installed with -g

> node-sass@4.5.3 install C:\Dev Zotero\Git\build\zotero-client\node_modules\node-sass
> node scripts/install.js

module.js:487
    throw err;
    ^

Error: Cannot find module 'are-we-there-yet'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Dev Zotero\Git\build\zotero-client\node_modules\npmlog\log.js:2:16)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Gracile\AppData\Roaming\npm-cache\_logs\2017-07-06T16_30_19_861Z-debug.log
dstillman commented 7 years ago

Delete both node_modules and package-lock.json and try again.

gracile-fr commented 7 years ago

Thank you very much! Any reason for having a blank screen on Zotero startup? (I can click and open the menus but that's all, nothing is functional. It's a clean install, clean profile, I even changed the prefs to force the en-US locale) blank_z_startup

dstillman commented 7 years ago

Report ID?

gracile-fr commented 7 years ago

I can't generate a report ID. Here are the messages I see in the Error Console: (FYI, I rebuild after the latest commit at the moment, i.e. https://github.com/zotero/zotero/commit/1da18e4ca7919098be3811690e1c8d70b388567c)

Could not read 'file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/extensions/zoteroOpenOfficeIntegration@zotero.org/components/zoteroIntegration.xpt'.

Timestamp: 07/07/2017 16:07:10
Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/components/zotero-service.js
Line: 438

Timestamp: 07/07/2017 16:07:10
Error: Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: resource://zotero/bluebird.js
Line: 5

Timestamp: 07/07/2017 16:07:10
Error: NS_ERROR_XPC_GS_RETURNED_FAILURE: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]
Source File: chrome://zotero/content/include.js
Line: 4

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/zoteroPane.js
Line: 368

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/fileInterface.js
Line: 45

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/recognizePDF.js
Line: 72

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/browser.js
Line: 157

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/lookup.js
Line: 34

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/locateMenu.js
Line: 99

Timestamp: 07/07/2017 16:07:10
Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/components/zotero-service.js
Line: 438

Timestamp: 07/07/2017 16:07:10
Error: Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: resource://zotero/bluebird.js
Line: 5

Timestamp: 07/07/2017 16:07:10
Error: NS_ERROR_XPC_GS_RETURNED_FAILURE: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]
Source File: chrome://zotero/content/include.js
Line: 4

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/itemPane.js
Line: 62

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/itembox.xml
Line: 257

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/attachmentbox.xml
Line: 149

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/noteeditor.xml
Line: 147

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/styled-textbox.xml
Line: 397

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/styled-textbox.xml
Line: 397

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/noteeditor.xml
Line: 147

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/styled-textbox.xml
Line: 397

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/styled-textbox.xml
Line: 397

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/relatedbox.xml
Line: 102

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/tagsbox.xml
Line: 120

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/itembox.xml
Line: 257

Timestamp: 07/07/2017 16:07:10
Error: TypeError: ZoteroPane_Local is undefined
Source File: chrome://zotero/content/standalone/standalone.xul
Line: 1

Timestamp: 07/07/2017 16:07:10
Error: TypeError: ZoteroPane_Local is undefined
Source File: chrome://zotero/content/standalone/standalone.xul
Line: 1

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/bindings/tagselector.xml
Line: 1035

Timestamp: 07/07/2017 16:07:10
Error: TypeError: Zotero is undefined
Source File: chrome://zotero/content/standalone/standalone.js
Line: 36

Timestamp: 07/07/2017 16:07:10
Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/components/zotero-service.js
Line: 438

Timestamp: 07/07/2017 16:07:10
Error: Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: resource://zotero/bluebird.js
Line: 5

Timestamp: 07/07/2017 16:07:10
Error: NS_ERROR_XPC_GS_RETURNED_FAILURE: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]
Source File: file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/extensions/zoteroOpenOfficeIntegration@zotero.org/components/zoteroOpenOfficeIntegration.js
Line: 41

Timestamp: 07/07/2017 16:07:10
Error: NS_ERROR_XPC_GS_RETURNED_FAILURE: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]
Source File: file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/extensions/zoteroOpenOfficeIntegration@zotero.org/components/zoteroOpenOfficeIntegration.js
Line: 41

Timestamp: 07/07/2017 16:07:10
Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/components/zotero-service.js
Line: 438

Timestamp: 07/07/2017 16:07:10
Error: Error: Module `bluebird/promise` is not found at resource://zotero/bluebird/promise.js
Source File: resource://zotero/bluebird.js
Line: 5

Timestamp: 07/07/2017 16:07:10
Error: NS_ERROR_XPC_GS_RETURNED_FAILURE: Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]
Source File: resource://zotero-winword-integration/installer.jsm
Line: 26

1499436580948   addons.update-checker   WARN    Update manifest for zoteroWinWordIntegration@zotero.org did not contain an updates property

1499436580975   addons.update-checker   WARN    Update manifest for zoteroOpenOfficeIntegration@zotero.org did not contain an updates property
dstillman commented 7 years ago

Do you see promise.js in build/resource/bluebird in zotero/zotero? Not sure it would matter for this, but symlinks do need to be working on your system — you need the latest Git from Cygwin, and maybe (if this is an old Cygwin installation) some other things. If you have Git installed separately, I would uninstall it. You might have luck clearing your Cygwin installation completely and starting again. This works for me on Windows 7.

You can also get a build directory from S3 that can be used in place of the zotero/zotero repo. When a commit is run on Travis, the contents of the build directory are zipped and pushed to S3. So the current commit's built code is available at http://zotero-download.s3.amazonaws.com/ci/client/e2d7c7e999d2cddd26b30780c2f37cd41d501c97.zip. So you could unzip those files into an empty build within the Zotero repo and then scripts/dir_build in zotero-standalone-build should work.

gracile-fr commented 7 years ago

There is no bluebirddirectory at all in build/resource. Does that mean that symlinks are not working? Is it certainly related to Cygwin (it is a completely up-to-date Cygwin installation)?

I have Git installed separately indeed, but I'd like to keep it if possible!

dstillman commented 7 years ago

Does node_modules/bluebird/js/release exist, and are there files in it? That should be symlinked to resource/bluebird, which should end up as a regular folder at build/resource/bluebird after the build.

gracile-fr commented 7 years ago

(If I compare the unzipped build/resource files from http://zotero-download.s3.amazonaws.com/ci/client/59edca783e2b2cff520b2af9e986315ab8b21ea3.zip and those created via Cygwin, two directories bluebirdand weblibraryare missing. But I have two files bluebirdand weblibrarywhich weigh 1kb. Their content is undecipherable except the word symlink, when I open them in a text editor.)

gracile-fr commented 7 years ago

Does node_modules/bluebird/js/release exist, and are there files in it?

Yes

gracile-fr commented 7 years ago

That should be symlinked to resource/bluebird, which should end up as a regular folder at build/resource/bluebird after the build.

That's not the case as I just described. So you're right that's the problem. Do you know how can I find a solution?

dstillman commented 7 years ago

I don't, sorry — all I can tell you is this should work with a clean install of Cygwin and no separate Git installation. I believe there are some settings that affect this, but you'd have to look those up.

(You can also create Windows builds on Mac/Linux, if that's an option for you.)

gracile-fr commented 7 years ago

Ok. I will just automatically copy node_modules\bluebird\js\release and \node_modules\zotero-web-library\lib to build\resource\web-library and \build\resource\bluebird since symlinks are broken for me and I do not want, for the moment, remove my separate Git installation.

I have one last question before closing this issue, if you can help me again. It seems that npm run builddoes not work as expected for me, i.e. it does not "update" zotero-client/build. The consequence is that Zotero is built with this strange version number "Version: 5.0.1.SOURCE.6de7fdedf" (whereas https://github.com/zotero/zotero/commit/6de7fdedf985ca1fddecf7371bb444566ff868d3 is after 5.0.5…). I need to delete manually zotero-client/build before running npm run build to build everything correctly, which is not a big deal but surprised me. Is it specific to my installation?

dstillman commented 7 years ago

Is it specific to my installation?

Yes. The build script symlinks non-JS/CSS files into the build directory, including install.rdf, which contains the version. If you're not getting symlinks then none of those files will be updated for you.

gracile-fr commented 7 years ago

Thank you.

When I run zotero with -debug flag, I get this error:

Timestamp: 21/07/2017 11:26:40 Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXPCComponents_Utils.import]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///C:/Dev%20Zotero/Git/build/zotero-standalone-build/staging/Zotero_win32/components/zotero-service.js :: ZoteroCommandLineHandler.prototype.handle :: line 567" data: no]

dstillman commented 7 years ago

-debugger, you mean? That only works if you included the devtools at build time (-t argument to dir_build).

gracile-fr commented 7 years ago

Yes, I meant -debugger. This is working with -t, thank you (maybe this could be documented there?)

dstillman commented 7 years ago

I've added it, but note that the helper script mentioned there takes care of this for you.

dstillman commented 7 years ago

I was wrong here. Seems like the symlinks are broken in a default install on Windows — I forgot that we were precompiling the JS in Travis and just doing the final packaging on each platform. Follow https://groups.google.com/d/topic/zotero-dev/Lt_PlgI3yA4/discussion for more. Sorry to waste your time here.

gracile-fr commented 7 years ago

Yes, I've followed this with hope and sent to Frank the link to our discussion. As I wrote above, I've finally made a simple script which copies bluebird\js\release and zotero-web-library\lib to build\resource\web-library and \build\resource\bluebird…

tnajdek commented 7 years ago

Beginning with Windows Vista offers some native support for symlinks, however, by default, neither Git nor Cygwin supports them, instead opting for a custom workaround.

However Node, which is used to run our build scripts, does not understand these workarounds but works perfectly fine with native Windows symlinks.

Furthermore symlinks on windows have multiple limitations, two of which are relevant:

Workaround

  1. Run Cygwin terminal as Administrator (right click -> Run as Administrator)
  2. Force Cygwin to use native windows symlinks:
    export CYGWIN="winsymlinks:nativestrict"
  3. Clone Zotero source code forcing use of native symlinks on Windows. This should fail because git is trying to create symlinks to non-existent files (npm dependencies), that's ok - all we really need is package.json.
    git clone -c core.symlinks=true https://github.com/zotero/zotero.git
  4. Now install the npm dependencies
    cd zotero
    npm install
  5. Now git should be able to create symlinks, continue checkout with:
    git checkout -f HEAD 
  6. Checkout Zotero submodules
    git submodule update --init --recursive

    Following the above instructions should produce native windows symlinks, this can be very quickly verified in explorer:

screen shot 2017-08-04 at 15 48 58
gracile-fr commented 7 years ago

Great, thank you very much @tnajdek ! I've followed the instructions you wrote there, which are a bit different, and it's working now.

gracile-fr commented 6 years ago

@tnajdek, you wrote:

Furthermore symlinks on windows have multiple limitations, two of which are relevant: Creating symlinks requires a special permission, usually only granted to Administrator user Creating symlinks to non-existent files is not allowed

Does that mean that I must follow your instructions each time I (re)build ?

tnajdek commented 6 years ago

Hey @gracile-fr , the short answer is: No, only when you checkout for the first time.

Long answer if you're interested why:

Zotero contains symlinks to dependencies in node_modules, if we would try to checkout these symlinks immediately, we break the "Creating symlinks to non-existent files is not allowed" rule on Windows, because node_modules have not been installed yet! This creates a broken repo that won't work. Instead, in the instructions you mentioned, we advise to checkout only a couple of files required to run npm install and only then checkout the rest of the repo. This way, dependencies already exists in node_modules and can be symlinked during the checkout. On subsequent builds, when the entire repo is already checked out and npm dependencies have been installed, there is no need for this additional procedure.