Closed sharonj731 closed 4 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 (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
i have same issue too @ZeusTheTrueGod
What's a node version ?
@ZeusTheTrueGod
Thanks @ZeusTheTrueGod
@christocracy how to solve this issue
can this web app run in windows.? i get this erorr on windows
This is a node app. Node runs on Windows.
I do not use windows.
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
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.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 ]
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
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...
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",
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.
Sorry, it does not optimized for Windows. Please use docker-compose
to build it. PR #111
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: (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
14 verbose stack Exit status 1 14 verbose stack at EventEmitter.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 ]