Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build with npm i #42

Open
strin opened this issue Dec 27, 2016 · 0 comments
Open

Cannot build with npm i #42

strin opened this issue Dec 27, 2016 · 0 comments

Comments

@strin
Copy link

strin commented Dec 27, 2016

I cloned the repo and run npm i under the project dir. but i got

npm WARN deprecated babel-plugin-module-alias@1.6.0: WARNING: This project has been renamed to babel-plugin-module-resolver. Install babel-plugin-module-resolver for new features
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

> fsevents@1.0.15 install /Users/tims/vpn/client/node_modules/electron-sudo/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node" is installed via remote

> electron-sudo@4.0.12 prepublish /Users/tims/vpn/client/node_modules/electron-sudo
> npm run test


> electron-sudo@4.0.12 test /Users/tims/vpn/client/node_modules/electron-sudo
> npm run build && node_modules/mocha/bin/mocha --compilers js:babel-core/register ./tests


> electron-sudo@4.0.12 build /Users/tims/vpn/client/node_modules/electron-sudo
> node_modules/webpack/bin/webpack.js --config ./webpack/config.babel.js

Executing additional scripts before exit
Hash: 1bc259f4ec85dc49dcc7
Version: webpack 1.14.0
Time: 74ms
                                                     Asset       Size  Chunks             Chunk Names
                                         bin/libgksu2.so.0    69.7 kB          [emitted]
                                                  index.js    2.36 kB       0  [emitted]  main
                                           bin/elevate.exe     108 kB          [emitted]
                                    bin/applet.app/LICENSE    1.08 kB          [emitted]
                           bin/applet.app/Contents/PkgInfo    8 bytes          [emitted]
                                     bin/libgksu2.so.0.0.2    69.7 kB          [emitted]
                                                bin/gksudo    28.2 kB          [emitted]
                        bin/applet.app/Contents/Info.plist  960 bytes          [emitted]
                      bin/applet.app/Contents/MacOS/applet      25 kB          [emitted]
             bin/applet.app/Contents/Resources/applet.rsrc  362 bytes          [emitted]
       bin/applet.app/Contents/Resources/Scripts/main.scpt  526 bytes          [emitted]
bin/applet.app/Contents/Resources/description.rtfd/TXT.rtf  102 bytes          [emitted]
             bin/applet.app/Contents/Resources/applet.icns    56.4 kB          [emitted]
   [0] multi main 28 bytes {0} [built]
    + 1 hidden modules

ERROR in index.js from UglifyJs
SyntaxError: Unexpected token: punc ({) [./src/index.js:1,0]
/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-core/lib/transformation/file/index.js:600
      throw err;
      ^

SyntaxError: /Users/tims/vpn/client/node_modules/electron-sudo/dist/index.js: 'import' and 'export' may only appear at the top level (65:1)
  63 | /***/ function(module, exports) {
  64 |
> 65 | 	import {SudoerDarwin, SudoerWin32, SudoerLinux} from '~/lib/sudoer';
     | 	^
  66 |
  67 | 	export default (() => {
  68 | 	    let {platform} = process;
    at Parser.pp$5.raise (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:4246:13)
    at Parser.pp$1.parseStatement (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:1745:16)
    at Parser.parseStatement (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5218:22)
    at Parser.pp$1.parseBlockBody (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:2133:21)
    at Parser.pp$1.parseBlock (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:2114:8)
    at Parser.pp$3.parseFunctionBody (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3998:22)
    at Parser.parseFunctionBody (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5205:20)
    at Parser.pp$1.parseFunction (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:2251:8)
    at Parser.pp$3.parseFunctionExpression (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3596:17)
    at Parser.pp$3.parseExprAtom (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3558:19)
    at Parser.pp$3.parseExprSubscripts (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3331:19)
    at Parser.pp$3.parseMaybeUnary (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3311:19)
    at Parser.pp$3.parseExprOps (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3241:19)
    at Parser.pp$3.parseMaybeConditional (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3218:19)
    at Parser.pp$3.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3181:19)
    at Parser.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5694:20)
    at Parser.pp$3.parseExprListItem (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:4101:16)
    at Parser.parseExprListItem (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5425:24)
    at Parser.pp$3.parseExprList (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:4089:20)
    at Parser.pp$3.parseExprAtom (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3550:28)
    at Parser.pp$3.parseExprSubscripts (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3331:19)
    at Parser.pp$3.parseMaybeUnary (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3311:19)
    at Parser.pp$3.parseExprOps (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3241:19)
    at Parser.pp$3.parseMaybeConditional (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3218:19)
    at Parser.pp$3.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3181:19)
    at Parser.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5694:20)
    at Parser.pp$3.parseExprListItem (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:4101:16)
    at Parser.parseExprListItem (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5425:24)
    at Parser.pp$3.parseCallExpressionArguments (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3410:20)
    at Parser.pp$3.parseSubscripts (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3370:31)
    at Parser.pp$3.parseExprSubscripts (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3341:15)
    at Parser.pp$3.parseMaybeUnary (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3311:19)
    at Parser.pp$3.parseExprOps (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3241:19)
    at Parser.pp$3.parseMaybeConditional (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3218:19)
    at Parser.pp$3.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3181:19)
    at Parser.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5694:20)
    at Parser.pp$3.parseExpression (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3143:19)
    at Parser.pp$1.parseReturnStatement (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:1945:26)
    at Parser.pp$1.parseStatement (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:1716:19)
    at Parser.parseStatement (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5218:22)
    at Parser.pp$1.parseBlockBody (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:2133:21)
    at Parser.pp$1.parseBlock (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:2114:8)
    at Parser.pp$3.parseFunctionBody (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3998:22)
    at Parser.parseFunctionBody (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5205:20)
    at Parser.pp$1.parseFunction (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:2251:8)
    at Parser.pp$3.parseFunctionExpression (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3596:17)
    at Parser.pp$3.parseExprAtom (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3558:19)
    at Parser.pp$3.parseExprSubscripts (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3331:19)
    at Parser.pp$3.parseMaybeUnary (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3311:19)
    at Parser.pp$3.parseExprOps (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3241:19)
    at Parser.pp$3.parseMaybeConditional (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3218:19)
    at Parser.pp$3.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3181:19)
    at Parser.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5694:20)
    at Parser.pp$3.parseExprListItem (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:4101:16)
    at Parser.parseExprListItem (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5425:24)
    at Parser.pp$3.parseCallExpressionArguments (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3410:20)
    at Parser.pp$3.parseSubscripts (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3370:31)
    at Parser.pp$3.parseExprSubscripts (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3341:15)
    at Parser.pp$3.parseMaybeUnary (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3311:19)
    at Parser.pp$3.parseExprOps (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3241:19)
    at Parser.pp$3.parseMaybeConditional (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3218:19)
    at Parser.pp$3.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3181:19)
    at Parser.parseMaybeAssign (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5694:20)
    at Parser.pp$3.parseExpression (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:3143:19)
    at Parser.pp$1.parseStatement (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:1774:19)
    at Parser.parseStatement (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:5218:22)
    at Parser.pp$1.parseBlockBody (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:2133:21)
    at Parser.pp$1.parseTopLevel (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:1645:8)
    at Parser.parse (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:1537:17)
    at parse$1 (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babylon/lib/index.js:6466:37)
    at File.parse (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-core/lib/transformation/file/index.js:527:15)
    at File.parseCode (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-core/lib/transformation/file/index.js:612:20)
    at /Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-core/lib/transformation/pipeline.js:49:12
    at File.wrap (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-core/lib/transformation/file/index.js:574:16)
    at Pipeline.transform (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-core/lib/transformation/pipeline.js:47:17)
    at Object.transformFileSync (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-core/lib/api/node.js:138:10)
    at compile (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-register/lib/node.js:118:20)
    at loader (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-register/lib/node.js:144:14)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/tims/vpn/client/node_modules/electron-sudo/tests/index.js:3:1)
    at Module._compile (module.js:570:32)
    at loader (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at /Users/tims/vpn/client/node_modules/electron-sudo/node_modules/mocha/lib/mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/mocha/lib/mocha.js:217:14)
    at Mocha.run (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/mocha/lib/mocha.js:469:10)
    at Object.<anonymous> (/Users/tims/vpn/client/node_modules/electron-sudo/node_modules/mocha/bin/_mocha:404:18)
    at Module._compile (module.js:570:32)
    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:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/Users/tims/vpn/client/node_modules/.bin/npm" "run" "test"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! electron-sudo@4.0.12 test: `npm run build && node_modules/mocha/bin/mocha --compilers js:babel-core/register ./tests`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-sudo@4.0.12 test script 'npm run build && node_modules/mocha/bin/mocha --compilers js:babel-core/register ./tests'.
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 electron-sudo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build && node_modules/mocha/bin/mocha --compilers js:babel-core/register ./tests
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-sudo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-sudo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tims/vpn/client/node_modules/electron-sudo/npm-debug.log

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! electron-sudo@4.0.12 prepublish: `npm run test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-sudo@4.0.12 prepublish script 'npm run test'.
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 electron-sudo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-sudo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-sudo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tims/vpn/client/node_modules/electron-sudo/npm-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants