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

module not found #2

Closed
thistleknot opened this issue Apr 13, 2023 · 4 comments
Closed

module not found #2

thistleknot opened this issue Apr 13, 2023 · 4 comments

Comments

@thistleknot
Copy link

(3.9-JupyterLab) H:\Text2Graph\frontend>npm run start

graphgpt@0.1.0 start
react-scripts start

node:internal/modules/cjs/loader:1078
throw err;
^

Error: Cannot find module './lib/parse'
Require stack:

  • H:\Text2Graph\frontend\node_modules\cross-spawn\index.js
  • H:\Text2Graph\frontend\node_modules\react-dev-utils\crossSpawn.js
  • H:\Text2Graph\frontend\node_modules\react-scripts\bin\react-scripts.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (H:\Text2Graph\frontend\node_modules\cross-spawn\index.js:4:15)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'H:\Text2Graph\frontend\node_modules\cross-spawn\index.js',
    'H:\Text2Graph\frontend\node_modules\react-dev-utils\crossSpawn.js',
    'H:\Text2Graph\frontend\node_modules\react-scripts\bin\react-scripts.js'
    ]
    }

Node.js v18.15.0

@thistleknot
Copy link
Author

okay, I got past that error (didn't download the pkl file, needed to install some react from npm).

Now
(3.9-JupyterLab) H:\Text2Graph\frontend>npm run start

graphgpt@0.1.0 start
react-scripts start

node:internal/modules/cjs/loader:444
throw err;
^

Error: Cannot find module 'H:\Text2Graph\frontend\node_modules\source-list-map\lib\index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:436:19)
at Module._findPath (node:internal/modules/cjs/loader:678:18)
at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object. (H:\Text2Graph\frontend\node_modules\webpack-sources\lib\RawSource.js:9:21)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32) {
code: 'MODULE_NOT_FOUND',
path: 'H:\Text2Graph\frontend\node_modules\source-list-map\package.json',
requestPath: 'source-list-map'
}

Node.js v18.15.0

(3.9-JupyterLab) H:\Text2Graph\frontend>

@thistleknot
Copy link
Author

The API works
image

@thistleknot
Copy link
Author

thistleknot commented Apr 13, 2023

import requests

#def main():
# Set the API endpoint URL
url = "http://localhost:8000/get_graph"

# Set the text input for the API
text_input = "The capital of France is Paris."

# Send a GET request to the API with the text input
response = requests.get(url, params={"text": text_input})

# Get the JSON response from the API
response_json = response.json()

# Print the response data (graph)
print(response_json["data"])

@xyjigsaw
Copy link
Owner

Thank you for your interest in our work. If there are some other problems, please feel free to leave comments here.

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