iamkevingreen / electron-react-auth0

Electron starter with React - Auth0 - HMR
MIT License
8 stars 3 forks source link

npm start fails #3

Open hamoodij opened 7 years ago

hamoodij commented 7 years ago

I followed your instructions, which are as follows:

in the npm-debug.log i get the following result:

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@3.10.10 3 info using node@v6.10.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle electron-auth0-react@1.0.0~prestart: electron-auth0-react@1.0.0 6 silly lifecycle electron-auth0-react@1.0.0~prestart: no script for prestart, continuing 7 info lifecycle electron-auth0-react@1.0.0~start: electron-auth0-react@1.0.0 8 verbose lifecycle electron-auth0-react@1.0.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle electron-auth0-react@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/admin/Documents/Projects/lvg-ms/app/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 10 verbose lifecycle electron-auth0-react@1.0.0~start: CWD: /Users/admin/Documents/Projects/lvg-ms/app 11 silly lifecycle electron-auth0-react@1.0.0~start: Args: [ '-c', 'ENV=development electron .' ] 12 silly lifecycle electron-auth0-react@1.0.0~start: Returned: code: 1 signal: null 13 info lifecycle electron-auth0-react@1.0.0~start: Failed to exec start script 14 verbose stack Error: electron-auth0-react@1.0.0 start: ENV=development electron . 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/local/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/local/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:877:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 15 verbose pkgid electron-auth0-react@1.0.0 16 verbose cwd /Users/admin/Documents/Projects/lvg-ms/app 17 error Darwin 16.6.0 18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 19 error node v6.10.0 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error electron-auth0-react@1.0.0 start: ENV=development electron . 22 error Exit status 1 23 error Failed at the electron-auth0-react@1.0.0 start script 'ENV=development electron .'. 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 electron-auth0-react package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error ENV=development electron . 23 error You can get information on how to open an issue for this project with: 23 error npm bugs electron-auth0-react 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls electron-auth0-react 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

content of my package.json:

{ "name": "electron-auth0-react", "version": "1.0.0", "description": "Electron starter with React and Basic Authentication with Auth0", "main": "main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "ENV=development electron .", "watch": "webpack-dev-server", "electron-rebuild": "electron-rebuild", "build": "webpack", "package": "webpack --config webpack.config.production.js && electron-packager . ReactAuth --platform=darwin --arch=all --overwrite" }, "author": "iamkevingreen", "license": "MIT", "devDependencies": { "babel-core": "^6.22.1", "babel-loader": "^6.2.10", "babel-plugin-stylus-compiler": "^1.4.0", "babel-plugin-transform-css-import-to-string": "0.0.2", "babel-plugin-version-inline": "^1.0.0", "babel-preset-es2015": "^6.22.0", "babel-preset-es2015-loose": "^8.0.0", "babel-preset-react": "^6.22.0", "babel-preset-stage-0": "^6.22.0", "css-loader": "^0.26.1", "electron-packager": "^8.5.1", "electron-prebuilt": "^1.4.13", "electron-rebuild": "^1.5.7", "node-libs-browser": "^2.0.0", "style-loader": "^0.13.1", "webpack": "^1.14.0", "webpack-dev-server": "^1.16.2" }, "dependencies": { "auth0-lock": "^10.10.2", "autoprefixer-loader": "^3.2.0", "events": "^1.1.1", "json-loader": "^0.5.4", "jwt-decode": "^2.1.0", "node-sass": "^4.3.0", "react": "^15.4.2", "react-dom": "^15.4.2", "react-router": "^3.0.2", "sass-loader": "^4.1.1" } }

Thanks @iamkevingreen @tkntobfrk !

hamoodij commented 7 years ago

Side note, if i type electron . the app opens however i get the following error in the console:

Warning: Accessing PropTypes via the main React package is deprecated. User the prop-types package from npm instead.

&

Uncaught Error: A 'clientID' string must be provided as first argument.

iamkevingreen commented 7 years ago

@hamoodij the clientId is referring to the AuthService initiation, if you don' make a copy of config-default and put in your own auth0 preferences it will fail.

I'm also not totally sure how compatible it is with other versions of node, I'm on 7.2 and was able to get it running just now. If you use nvm you can switch between your versions of node.