Giter VIP home page Giter VIP logo

discovery-nodejs's Issues

Change titles for consistency

The hosted demo is at a URL that contains: discovery-news-demo.

Let's change the repo name to: watson-developer-cloud/discovery-news-demo.

And change the main readme title to: "Discovery News Demo".

can't deploy app to cloud

Hi!

At the time of doing the deployment, i have this error:

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 crashed
FAILED
Error restarting application: Start unsuccessful

The application log error shows the following:

2018-08-30T16:23:33.02-0300 [APP/PROC/WEB/0] OUT > @ibm-watson/[email protected] start /home/vcap/app
2018-08-30T16:23:33.02-0300 [APP/PROC/WEB/0] OUT > node scripts/start.js
2018-08-30T16:23:33.71-0300 [APP/PROC/WEB/0] OUT Server running on port: 8080
2018-08-30T16:23:34.19-0300 [CELL/0] OUT Container became healthy
2018-08-30T16:23:36.39-0300 [APP/PROC/WEB/0] OUT Something is already running on port 8080.
2018-08-30T16:23:36.49-0300 [APP/PROC/WEB/0] OUT Exit status 0

Pain points with "View Query"

  • Queries for each insight pane (Top Stories, Top Entities, etc) are all the same, but the responses are different.
  • It is difficult to understand how to construct an API request from the queries.
  • Query should be called "Request", because in the Query pane there is a field called "query"

Right now:

  • Demo makes a single API call and uses sections of the response for different insights
  • "View Query" Query tab is identical for each pane
  • Response tab is different for each pane

image

image

What should happen:

  • Separate requests for each pane to facilitate easy understanding. When someone views the request for the Top Entities pane, they should learn how to get Top Entities alone, not Top Entities, Concepts, Sentiment, etc.
  • Or the app should more clearly explain that the response in each section is a subset of the single large response
  • "View Query" button and "Query" tab should be called "View Request" / "Request", because Discovery has a specific parameter called "query" that is shown in the "Query" tab

Trying to Deploy on BlueMix by Pressing button on ReadMe fails with the following errors

By pressing the "Deploy to Bluemix" button in the readme and making no changes to the code. The following is my log file.

Also REACT_APP_BLUEMIX_ANALYICS: is not in my manifest.yml file, but DEMO_DEPLOY apprears to be in it place.

My intention is to get this to run on one of my Discovery collections... Does the discovery collection have to be a standard collection?

Thanks in advance for the Feedback.

Jon
--------------------------------------------------------------- Log file
Preparing to start the job...
Preparing the build artifacts...
Target: https://api.ng.bluemix.net
FAILED
Service instance Discovery-Demo not found
Creating service instance Discovery-Demo in org [email protected] / space dev as [email protected]...
OK

Create in progress. Use 'cf services' or 'cf service Discovery-Demo' to check operation status.

Attention: The plan standard of service discovery is not free. The instance Discovery-Demo will incur a cost. Contact your administrator if you think this is in error.

Writing manifest.yml...
Manifest file written
name: watson-discovery-service-news-demo-JonD-1
instances: 5
memory: 512M
command: node server.js
services:

  • Discovery-Demo
    env:
    REACT_APP_BLUEMIX_ANALYICS:

Pushing new app:watson-discovery-service-news-demo-JonD-1
FAILED
Error reading manifest file:
env var 'REACT_APP_BLUEMIX_ANALYICS' should not be null

Finished: FAILED

Demo code fails to start on IBM Cloud

Hi
Steps:

  1. Cloned github 'discovery-nodejs' code to local machine.
  2. Created .env file and edited to include required 'Discovery service' elements.
  3. Edited manifest.yml file to include my discovery service, and application name, etc.
  4. ran "cf push" to upload code into my ibm cloud space.
  5. Application starts then crash with following error;
2018-10-31T07:36:33.45+0000 [APP/PROC/WEB/0]OUT Server running on port: 8080
2018-10-31T07:36:33.45+0000 [APP/PROC/WEB/0]OUT ERROR: Error: spawn ./node_modules/react-scripts/bin/react-scripts.js ENOENT
2018-10-31T07:36:33.56+0000 [APP/PROC/WEB/0]OUT Exit status 0
2018-10-31T07:36:33.58+0000 [CELL/SSHD/0]OUT Exit status 0
2018-10-31T07:36:33.61+0000 [CELL/0]     OUT Cell a7187c69-5c2d-412a-960d-687d643f9e53 stopping instance 9c569aa7-1d9f-4d57-7e85-5a71
2018-10-31T07:36:33.61+0000 [CELL/0]     OUT Cell a7187c69-5c2d-412a-960d-687d643f9e53 destroying container for instance 9c569aa7-1d9f-4d57-7e85-5a71
2018-10-31T07:36:33.66+0000 [API/7]      OUT App instance exited with guid 5cbabf15-a6ea-4bbe-8ed0-9798a3df4229 payload: {"instance"=>"9c569aa7-1d9f-4d57-7e85-5a71", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"Codependent step exited", "crash_count"=>61, "crash_timestamp"=>1540971393597529186, "version"=>"9f76e2e9-7d63-4800-ac43-c09ea0de71d0"}
2018-10-31T07:36:40.24+0000 [CELL/0]     OUT Cell a7187c69-5c2d-412a-960d-687d643f9e53 successfully destroyed container for instance 9c569aa7-1d9f-4d57-7e85-5a71
2018-10-31T07:52:39.45+0000 [CELL/0]     OUT Cell 38493bb6-b0fc-4c81-a0ef-05c0416d2c3e creating container for instance f101cfcd-e4cb-
  1. Tried some of the fixes detailed in #89 issue, but these also failed.

Can't deploy to cloud

@germanattanasio - this works fine when running locally, but I'm running into an issue when trying to deploy to cloud. Note that there is no other app in my space with this name, and that there are no log errors in the app log from the IBM Cloud UI.

rhagarty@Richs-MBP-15 discovery-nodejs (master) $ ibmcloud app push
Invoking 'cf push'...

Pushing from manifest to org IBM Cloud Storage / space dev as [email protected]...
Using manifest file /Users/rhagarty/journeys/discovery-nodejs/manifest.yml

Deprecation warning: Specifying app manifest attributes at the top level is deprecated. Found: command, env, instances, memory, name, services.
Please see http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#deprecated for alternatives and other app manifest deprecations. This feature will be removed in the future.

Using manifest file /Users/rhagarty/journeys/discovery-nodejs/manifest.yml

Creating app discovery-news-demo-crawl-date in org IBM Cloud Storage / space dev as [email protected]...
OK

Creating route discovery-news-demo-crawl-date.mybluemix.net...
OK

FAILED
Server error, status code: 400, error code: 210003, message: The host is taken: discovery-news-demo-crawl-date

Add telium

We need to make sure the demo loads

function loadAnalytics() {
  var idaScript = document.createElement('script');
  idaScript.src = '//www.ibm.com/common/stats/ida_stats.js';
  document.head.appendChild(idaScript);
}

window.addEventListener('load', loadAnalytics);

react-scripts ENOENT

Error from logs:

[email protected] start C:\GitHub\discovery-nodejs
node scripts/start.js

Server running on port: 5000
ERROR: Error: spawn ./node_modules/.bin/react-scripts ENOENT
events.js:160
throw er; // Unhandled 'error' event
^

Error: spawn pkill ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3

After debugging for a long time, I eventually had to modify scripts/start.js to use 'exec' instead of 'spawn' to make it work. Here is the page that talks about the issue with spawn on Windows machines and cross-platform executions:

https://nodejs.org/api/child_process.html#child_process_spawning_bat_and_cmd_files_on_windows

Please let me know if you happen to know a better way to solve this issue. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.