Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when running project #60

Open
bitgainz opened this issue Jan 23, 2021 · 1 comment
Open

Errors when running project #60

bitgainz opened this issue Jan 23, 2021 · 1 comment

Comments

@bitgainz
Copy link

bitgainz commented Jan 23, 2021

Local test - when submitting credentials
Proxy error: Could not proxy request /api/items from localhost:3000 to http://localhost:5000/. [1] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).

When deploying to heroku - error log :

-----> Building on the Heroku-20 stack
-----> Node.js app detected

-----> Creating runtime environment

   NPM_CONFIG_LOGLEVEL=error
   NODE_VERBOSE=false
   NODE_ENV=production
   NODE_MODULES_CACHE=true

-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)

   Resolving node version 12.x...
   Downloading and installing node 12.20.1...
   Using default npm version: 6.14.10

-----> Installing dependencies
Installing node modules (package.json)

   > [email protected] postinstall /tmp/build_e7159bee/node_modules/core-js
   > node -e "try{require('./postinstall')}catch(e){}"
   
   
   > [email protected] postinstall /tmp/build_e7159bee/node_modules/nodemon
   > node bin/postinstall || exit 0
   
   Love nodemon? You can now support the project via the open collective:
    > https://opencollective.com/nodemon/donate
   
   added 529 packages from 324 contributors and audited 531 packages in 19.175s
   
   7 packages are looking for funding
     run `npm fund` for details
   
   found 1 low severity vulnerability
     run `npm audit fix` to fix them, or `npm audit` for details

-----> Build
Running heroku-postbuild

   > [email protected] heroku-postbuild /tmp/build_e7159bee
   > NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
   
   
   > [email protected] postinstall /tmp/build_e7159bee/client/node_modules/babel-runtime/node_modules/core-js
   > node -e "try{require('./postinstall')}catch(e){}"
   
   
   > [email protected] postinstall /tmp/build_e7159bee/client/node_modules/core-js
   > node -e "try{require('./postinstall')}catch(e){}"
   
   
   > [email protected] postinstall /tmp/build_e7159bee/client/node_modules/core-js-pure
   > node -e "try{require('./postinstall')}catch(e){}"
   
   added 1690 packages from 1077 contributors and audited 1703 packages in 62.777s
   
   78 packages are looking for funding
     run `npm fund` for details
   
   found 5 vulnerabilities (1 low, 4 high)
     run `npm audit fix` to fix them, or `npm audit` for details
   
   > [email protected] build /tmp/build_e7159bee/client
   > react-scripts build
   
   Creating an optimized production build...
   Failed to compile.
   
   /tmp/build_e7159bee/client/src/App.tsx
   TypeScript error in /tmp/build_e7159bee/client/src/App.tsx(1,34):
   Could not find a declaration file for module 'react'. '/tmp/build_e7159bee/client/node_modules/react/index.js' implicitly has an 'any' type.
     If the 'react' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react`  TS7016
   
     > 1 | import React, { useEffect } from 'react';
         |                                  ^
       2 | import AppNavbar from './components/AppNavbar';
       3 | import ShoppingList from './components/ShoppingList';
       4 | import ItemModal from './components/ItemModal';

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: react-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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! /tmp/npmcache.o5qtJ/_logs/2021-01-22T22_42_26_188Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] heroku-postbuild: NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] heroku-postbuild 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! /tmp/npmcache.o5qtJ/_logs/2021-01-22T22_42_26_216Z-debug.log
-----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys
   
   Some possible problems:
   
   - Node version not specified in package.json
     https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
   
   Love,
   Heroku

! Push rejected, failed to compile Node.js app.
! Push failed

@sayinmehmet47
Copy link

{

  "proxy": "http://127.0.0.1:5000"
}

use that instead localhost:5000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants