transistorsoft / background-geolocation-console

A field-testing & analysis server for the Background Geolocation plugin
MIT License
151 stars 157 forks source link

'npm run server' fails #37

Closed sharonj731 closed 4 years ago

sharonj731 commented 7 years ago

Got this response in the npm-debug log

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'server' ] 2 info using npm@3.10.10 3 info using node@v6.11.2 4 verbose run-script [ 'preserver', 'server', 'postserver' ] 5 info lifecycle background-geolocation-console@2.0.0~preserver: background-geolocation-console@2.0.0 6 silly lifecycle background-geolocation-console@2.0.0~preserver: no script for preserver, continuing 7 info lifecycle background-geolocation-console@2.0.0~server: background-geolocation-console@2.0.0 8 verbose lifecycle background-geolocation-console@2.0.0~server: unsafe-perm in lifecycle true 9 verbose lifecycle background-geolocation-console@2.0.0~server: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Administrator\myappfiles\background-geolocation-console-master\node_modules.bin;C:\Program Files\Java\jdk\bin;C:\Program Files\Java\jre\bin;C:\Program Files\Android\android-sdk\tools;C:\Program Files\Android\android-sdk\platform-tools;C:\Windows\System32;C:\Users\Administrator\AppData\Local\Android\sdk1\tools;C:\Program Files\Google\google_appengine\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs;C:\Program Files\Git\bin;C:\Program Files\Google\google_appengine\;C:\IONICSETUP\test;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code\bin 10 verbose lifecycle background-geolocation-console@2.0.0~server: CWD: C:\Users\Administrator\myappfiles\background-geolocation-console-master 11 silly lifecycle background-geolocation-console@2.0.0~server: Args: [ '/d /s /c', 'babel-node --presets=\'node6\' server.js' ] 12 silly lifecycle background-geolocation-console@2.0.0~server: Returned: code: 1 signal: null 13 info lifecycle background-geolocation-console@2.0.0~server: Failed to exec server script 14 verbose stack Error: background-geolocation-console@2.0.0 server: babel-node --presets='node6' server.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:891:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 15 verbose pkgid background-geolocation-console@2.0.0 16 verbose cwd C:\Users\Administrator\myappfiles\background-geolocation-console-master 17 error Windows_NT 6.1.7601 18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "server" 19 error node v6.11.2 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error background-geolocation-console@2.0.0 server: babel-node --presets='node6' server.js 22 error Exit status 1 23 error Failed at the background-geolocation-console@2.0.0 server script 'babel-node --presets='node6' server.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the background-geolocation-console package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error babel-node --presets='node6' server.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs background-geolocation-console 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls background-geolocation-console 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

manish2535 commented 7 years ago

Same here -

$ npm run server

background-geolocation-console@2.0.0 server C:\Users\mpradhan\Desktop\background-geolocation-console-master babel-node --presets='node6' server.js

C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:328 throw e; ^

Error: Couldn't find preset "'node6'" relative to directory "C:\Users\mpradhan\Desktop\background-geolocation-console-master" at C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:293:19 at Array.map () at OptionManager.resolvePresets (C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20) at OptionManager.mergePresets (C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:264:10) at OptionManager.mergeOptions (C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:249:14) at OptionManager.init (C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:368:12) at compile (C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-register\lib\node.js:103:45) at loader (C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-register\lib\node.js:144:14) at Object.require.extensions.(anonymous function) [as .js] (C:\Users\mpradhan\Desktop\background-geolocation-console-master\node_modules\babel-register\lib\node.js:154:7) at Module.load (module.js:554:32) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! background-geolocation-console@2.0.0 server: babel-node --presets='node6' server.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the background-geolocation-console@2.0.0 server 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\mpradhan\AppData\Roaming\npm-cache_logs\2017-11-20T22_05_18_076Z-debug.log

StevenStarz commented 6 years ago

i have same issue too @ZeusTheTrueGod

AndreyKozlov1984 commented 6 years ago

What's a node version ?

StevenStarz commented 6 years ago

whatsapp image 2018-02-21 at 14 51 26

StevenStarz commented 6 years ago

@ZeusTheTrueGod

christocracy commented 6 years ago

Thanks @ZeusTheTrueGod

ryanpram commented 6 years ago

@christocracy how to solve this issue

ryanpram commented 6 years ago

can this web app run in windows.? i get this erorr on windows

christocracy commented 6 years ago

This is a node app. Node runs on Windows.

I do not use windows.

PRATHYUSH-DOM commented 6 years ago

npm run server show this error

ERROR in ./~/react-toolbox/components/index.js Module parse failed: /Users/prathyush/Desktop/ionic/Onjiz project files/web geo/node_modules/react-toolbox/components/index.js Unexpected token (24:7) You may need an appropriate loader to handle this file type. | export { default as ProgressBar } from './progress_bar'; | export * from './radio'; | export Ripple from './ripple'; | export { default as Slider } from './slider'; | export { default as Snackbar } from './snackbar'; @ ./src/client/components/Viewport.js 8:0-77 @ ./src/client/main.js @ multi webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000 react-hot-loader/patch ./main.js

M4rcos commented 6 years ago

Hello, I got this

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ] 2 info using npm@3.10.10 3 info using node@v6.12.3 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle background-geolocation-console@2.0.0~prestart: background-geolocation-console@2.0.0 6 silly lifecycle background-geolocation-console@2.0.0~prestart: no script for prestart, continuing 7 info lifecycle background-geolocation-console@2.0.0~start: background-geolocation-console@2.0.0 8 verbose lifecycle background-geolocation-console@2.0.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle background-geolocation-console@2.0.0~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/var/bnfc/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 10 verbose lifecycle background-geolocation-console@2.0.0~start: CWD: /var/bnfc 11 silly lifecycle background-geolocation-console@2.0.0~start: Args: [ '-c', 'babel-node --presets=\'node6\' server.js' ] 12 silly lifecycle background-geolocation-console@2.0.0~start: Returned: code: 1 signal: null 13 info lifecycle background-geolocation-console@2.0.0~start: Failed to exec start script 14 verbose stack Error: background-geolocation-console@2.0.0 start: babel-node --presets='node6' server.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:920:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 15 verbose pkgid background-geolocation-console@2.0.0 16 verbose cwd /var/bnfc 17 error Linux 4.4.0-109-generic 18 error argv "/usr/bin/node" "/usr/bin/npm" "start" 19 error node v6.12.3 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error background-geolocation-console@2.0.0 start: babel-node --presets='node6' server.js 22 error Exit status 1 23 error Failed at the background-geolocation-console@2.0.0 start script 'babel-node --presets='node6' server.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the background-geolocation-console package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error babel-node --presets='node6' server.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs background-geolocation-console 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls background-geolocation-console 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

rorysedgwick commented 6 years ago

This seems to be an underlying problem with react-toolbox containing non-valid ES6 syntax for some module imports. More information and a workaround can be found here

In short, replace the react-toolbox version in the package.json with 2.0.0-beta.12 instead of 2.0.0-beta.13

SagarBarawade commented 6 years ago

I have solved this problem with revised command and it worked for me.

Use : babel-node server.js --presets node6 instead of npm run server

Atleast the web part has been working for now...

Cheers...

MilesAdamson commented 5 years ago

For windows, change line 10 of package.json from

"server": "babel-node --presets='node6' server.js",

to this: (remove single quotes around node6)

"server": "babel-node --presets=node6 server.js",

mdailor commented 5 years ago

I had this "Couldn't find preset "'node6'" relative to directory" problem as well, @MilesAdamson's fix worked for me with node 10.16.3, npm 6.11.3 on Windows Server 2012 R2.

Sigura commented 4 years ago

Sorry, it does not optimized for Windows. Please use docker-compose to build it. PR #111