firefly icon indicating copy to clipboard operation
firefly copied to clipboard

Npm install and npm start issues

Open AndrewNB opened this issue 6 years ago β€’ 9 comments

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! [email protected] start: sh -ac '. ./.env.dev; firebase use dev && react-scripts start' npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script.

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

[email protected] 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 [email protected] and [email protected] (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 [email protected] and [email protected] (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 [email protected] 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 [email protected] No repository field. npm WARN [email protected] No license field.

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

AndrewNB avatar Jan 20 '19 13:01 AndrewNB

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

sampl avatar Jan 21 '19 18:01 sampl

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

AndrewNB avatar Jan 22 '19 07:01 AndrewNB

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

shibley avatar Apr 11 '19 22:04 shibley

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

Aidurber avatar Apr 16 '19 15:04 Aidurber

@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.

shibley avatar Apr 17 '19 20:04 shibley

@shibley Can you link the fix on StackOverflow?

mafelix avatar May 07 '19 03:05 mafelix

@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.

jon-star avatar Aug 08 '19 13:08 jon-star

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 [email protected] 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 avatar Aug 08 '19 16:08 sampl

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 [email protected] 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 [email protected] 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 avatar Aug 08 '19 19:08 sampl