sampl / firefly

Web app boilerplate for beginners based on Firebase and React 🔥
http://getfirefly.org/
234 stars 42 forks source link

Npm install and npm start issues #166

Open AndrewNB opened 5 years ago

AndrewNB commented 5 years ago

Having an issue getting started.

I have run npm install in the main directory along with functions and scripts,

I followed the read me to set up all the api keys. When I try npm start i get the following error:

sh -ac '. ./.env.dev; firebase use dev && react-scripts start'

'sh' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! firefly@0.1.0 start: sh -ac '. ./.env.dev; firebase use dev && react-scripts start' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the firefly@0.1.0 start script.

During Npm install i got the following errors: firefly\scripts>npm install

grpc@1.9.1 install c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.9.1/node-v64-win32-x64-unknown.tar.gz node-pre-gyp ERR! Pre-built binaries not found for grpc@1.9.1 and node@10.14.2 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.9.1/node-v64-win32-x64-unknown.tar.gz node-pre-gyp ERR! Pre-built binaries not found for grpc@1.9.1 and node@10.14.2 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) gypgyp ERR!ERR! configure errorconfigure error

gypgyp ERR!ERR! stackstack Error: Can't find Python executable "python", you can set the PYTHON env variable. Error: Can't find Python executable "python", you can set the PYTHON env variable. gypgyp ERR!ERR! stackstack at PythonFinder.failNoPython (C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19) at PythonFinder.failNoPython (C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19) gypgyp ERR!ERR! stackstack at PythonFinder. (C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16) at PythonFinder. (C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16) gypgyp ERR! ERR!stack at C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 stackgyp at C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 gypERR! ERR!stack at FSReqWrap.oncomplete (fs.js:154:21) stack at FSReqWrap.oncomplete (fs.js:154:21) gyp gypERR! ERR!System Windows_NT 10.0.16299 System Windows_NT 10.0.16299 gyp ERR!gyp command "C:\Program Files\nodejs\node.exe" "C:\Users\#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown" ERR!gyp commandERR! "C:\Program Files\nodejs\node.exe" "C:\Users\#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown" gypcwd c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc ERR! gypcwd c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc ERR!gyp node -vERR! v10.14.2 gypnode -v v10.14.2 ERR!gyp ERR!node-gyp -v v3.8.0 node-gyp -vgyp v3.8.0 gypERR! ERR!not ok not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1) node-pre-gyp ERR! stack at ChildProcess. (c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) node-pre-gyp ERR! System Windows_NT 10.0.16299 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library" node-pre-gyp ERR! cwd c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc node-pre-gyp ERR! node -v v10.14.2 node-pre-gyp ERR! node-pre-gyp -v v0.6.39 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users#\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --library=static_library --module=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1) npm WARN rollback Rolling back assert-plus@1.0.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'c:\apps\examples\firefly2\firefly\scripts\node_modules\google-gax\node_modules\grpc\node_modules\getpass\node_modules' npm WARN firefly-scripts@1.0.0 No repository field. npm WARN firefly-scripts@1.0.0 No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! grpc@1.9.1 install: node-pre-gyp install --fallback-to-build --library=static_library npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the grpc@1.9.1 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:

sampl commented 5 years ago

Sorry about that @AndrewNB. Are you using Windows by any chance? Looks like sh isn't cross platform.

I think I need to upgrade to the CRA-recommended x-platform method: https://facebook.github.io/create-react-app/docs/deployment#customizing-environment-variables-for-arbitrary-build-environments

AndrewNB commented 5 years ago

I was starting to get that idea from looking up the errors but wasn't sure. Would this then be compatible with Linux?

shibley commented 5 years ago

I am having a similar issue from OSX: sh -ac '. ./.env.dev; firebase use dev && react-scripts start' sh: firebase: command not found

Any help appreciated

Aidurber commented 5 years ago

@shibley You need to install firebase-tools globally: http://getfirefly.org/#getting-started See "Before you begin"

shibley commented 5 years ago

@shibley You need to install firebase-tools globally: http://getfirefly.org/#getting-started See "Before you begin"

Thanks, yeah it was an issue with my Path. Installing globally, but still was not working as intended. Found fix on StackOverflow.

mafelix commented 5 years ago

@shibley Can you link the fix on StackOverflow?

jon-star commented 5 years ago

@AndrewNB @sampl I was trying to set this up on Windows through Powershell and got the same error. One work around I've been using is to use WSL Bash. One way to access this is by using VS Code and then changing your default Shell to WSL Bash. This will be able to read the 'sh' commands that are causing the problem. When I follow the firefly tutorial through WSL it works.

sampl commented 5 years ago

Awesome! If you have time, I’d love for you to update the readme :)

Thanks for the tip!

On Thu, Aug 8, 2019 at 6:14 AM jon-star notifications@github.com wrote:

@AndrewNB https://github.com/AndrewNB @sampl https://github.com/sampl I was trying to set this up on Windows through Powershell and got the same error. One work around I've been using is to use WSL Bash. One way to access this is by using VS Code and then changing your default Shell to WSL Bash. This will be able to read the 'sh' commands that are causing the problem. When I follow the firefly tutorial through WSL it works.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/sampl/firefly/issues/166?email_source=notifications&email_token=AABYTK5VPBC3Y6HYDC3PVNTQDQL25A5CNFSM4GRGR342YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD33SDYI#issuecomment-519512545, or mute the thread https://github.com/notifications/unsubscribe-auth/AABYTK4CW5UASBYWOZVQNDTQDQL25ANCNFSM4GRGR34Q .

sampl commented 5 years ago

From Jon: “It's probably worth highlighting in the "Before you begin" section of your website that Windows users need to use WSL for the project to work, otherwise they only find out once they've installed the project and set up all the databases.”

TODO

On Thu, Aug 8, 2019 at 9:09 AM Sam Pierce Lolla sampiercelolla@gmail.com wrote:

Awesome! If you have time, I’d love for you to update the readme :)

Thanks for the tip!

On Thu, Aug 8, 2019 at 6:14 AM jon-star notifications@github.com wrote:

@AndrewNB https://github.com/AndrewNB @sampl https://github.com/sampl I was trying to set this up on Windows through Powershell and got the same error. One work around I've been using is to use WSL Bash. One way to access this is by using VS Code and then changing your default Shell to WSL Bash. This will be able to read the 'sh' commands that are causing the problem. When I follow the firefly tutorial through WSL it works.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/sampl/firefly/issues/166?email_source=notifications&email_token=AABYTK5VPBC3Y6HYDC3PVNTQDQL25A5CNFSM4GRGR342YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD33SDYI#issuecomment-519512545, or mute the thread https://github.com/notifications/unsubscribe-auth/AABYTK4CW5UASBYWOZVQNDTQDQL25ANCNFSM4GRGR34Q .