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

type error: Cannot find module '@jpmorganchase/perspective'. TS2307 #47

Open
tanay-nagarsheth opened this issue Apr 25, 2020 · 61 comments

Comments

@tanay-nagarsheth
Copy link

what is the error sir, please help, this error has been breaking my head since a long time now

error3
error2
error1

@rohit270699
Copy link

tanay what errrors are u having because im also facing the same problem

@tanay-nagarsheth
Copy link
Author

@rohit270699 I am facing Type Error : TS2307

@supriyodey
Copy link

me too facing the same issue

image

@yk-x-25
Copy link

yk-x-25 commented Apr 26, 2020

Guys, you need to start server. run python datafeed/server3.py

@Sarthakkathuria
Copy link

@tanay-nagarsheth this package has been moved to @finos/perspective
try npm i @finos/perspective
and update it in src/Graph.tsx and package.json

@Ayaanmoh
Copy link

@Sarthakkathuria Making those changes haven't fixed the problem. It says cannot find module @finos/perspective

@Ayaanmoh
Copy link

@TheYk98 Started the server. It runs without any issues. Then when we run npm start, we get the error.

@yk-x-25
Copy link

yk-x-25 commented Apr 28, 2020

@Ayaanmoh try deleting node_modules and replace with the node_modules folder(link in the doc) in the path. If you've tried that too, I'm not sure what's wrong

@Ayaanmoh
Copy link

I have tried replacing. after that npm start fails to start the server. I will try shifting to Windows for this task.

@Sarthakkathuria
Copy link

@Ayaanmoh check this
npm i @finos/perspective
https://www.npmjs.com/package/@finos/perspective

@Ayaanmoh
Copy link

@Sarthakkathuria tried to install finos as well. But it gave me the same error. i performed this on a virtual mac machine and it worked.
Steps:
npm install
npm i @finos/perspective
npm start

@harsh725
Copy link

harsh725 commented May 1, 2020

Even i am getting TS2307
anyone got the solution ?
i tried everything del node_modules , doing it again ,then i made changes in graph file
'@finos/perspective' insted of jpmorgan
still getting that error.

@SulthanNK
Copy link

I am also facing this issue, anyone got the solution?

@chandrikadeb7
Copy link

Change Line 2 of src/Graph.tsx to:
import { Table } from '@finos/perspective';
For Mac environment.

@SulthanNK
Copy link

what is the error, sir, please help, this error has been breaking my head since a long time now

error3

I also faced this issue yesterday, but I noticed that the actual problem that I have is a different version of node and npm. so, I downgrade it to the version to what mentioned in the setup pdf document(for windows)

Screenshot (175)

@shivansh49
Copy link

@Sarthakkathuria did you got the solution i am also facing same issue?please help

@shivansh49
Copy link

@tanay-nagarsheth did you got solution please help i am also facing same issue

@nirmalp-dev
Copy link

@shivansh49 yes , using nvm 11.0.0 solves the problem.

image

make sure you are executing these commands first.

@shivansh49
Copy link

@Nims972 thanks a lot it works for me

@SHREYASH-MUKESH
Copy link

Originally posted by @SHREYASH-MUKESH in #72 (comment)
this will surely work as it worked for me also with the same issue

@chandrikadeb7
Copy link

If anyone has any problem and is stuck anywhere, I have made a repo of my submitted files. Kindly have a look:
https://github.com/chandrikadeb7/JPMorgan-Chase-Virtual-Internship

@ikshitjalan
Copy link

delete package-log.js file then
npm install
npm i @finos/perspective
npm start

@chavishaarora
Copy link

I am facing a similar problem. Has anybody figured out the exact solution to this?

@SHREYASH-MUKESH
Copy link

I am facing a similar problem. Has anybody figured out the exact solution to this?

#62 (comment)

@vishwakarmanikhil
Copy link

for this error

  1. if you are using npm v11.0.0 then you will not face this error
    check your npm version first by command :
    node -v

2.if you have greater version than v11.0.0 then
just go to the your project directory and just type the command:
npm i @finos/perspective

this will install the required files in your project directory
and then goto your graph.tsx file and replace

import { Table } from '@jpmorganchase/perspective';

with this below code

import { Table } from '@finos/perspective';

@karshil2309
Copy link

If anyone has any problem and is stuck anywhere, I have made a repo of my submitted files. Kindly have a look:
https://github.com/chandrikadeb7/JPMorgan-Chase-Virtual-Internship

delete package-log.js file then
npm install
npm i @finos/perspective
npm start

It worked perfectly for me. Thanks @ikshitjalan

@abhishekyadavz
Copy link

  • npm install

  • npm i @finos/perspective

  • change in { import { Table } from '@jpmorganchase/perspective'; } to { import { Table } from '@finos/perspective' }

in JPMC-tech-task-2-PY3\src\ Graph.tsx

  • npm start

@arushichoudhary
Copy link

@Nikhilvish04
After trying all steps i am getting this new error.
error
can u please help.

@spandey1296
Copy link

spandey1296 commented Jun 14, 2020 via email

@spandey1296
Copy link

spandey1296 commented Jun 14, 2020 via email

@ShaikhHeeba07
Copy link

Guys try this : Open new Terminal and type ' npm i --save @finos/perspective-viewer '

@himu59
Copy link

himu59 commented Aug 11, 2020

for this error

  1. if you are using npm v11.0.0 then you will not face this error
    check your npm version first by command :
    node -v

2.if you have greater version than v11.0.0 then
just go to the your project directory and just type the command:
npm i @finos/perspective

this will install the required files in your project directory
and then goto your graph.tsx file and replace

import { Table } from '@jpmorganchase/perspective';

with this below code

import { Table } from '@finos/perspective';

Thanks bro

@spandey1296
Copy link

spandey1296 commented Aug 11, 2020 via email

@Mohit-15
Copy link

Mohit-15 commented Aug 22, 2020

image
can anyone help me with this issue??

@spandey1296
Copy link

spandey1296 commented Aug 23, 2020 via email

@amarnathz
Copy link

what I did to solve this issue is

  1. install nvm(node version manager) https://github.com/coreybutler/nvm-windows/releases
    filename : nvm-setup.zip
    2.open terminal and run nvm -v to check whether install or not
    3.then, install >>>>> nvm install v11.0.0 //it store node v11 in temp folder
  2. use that version by, nvm use 11.0.0
    5, then npm install and npm start

@amarnathz
Copy link

after all, did it show like this
Capture

@prashundey
Copy link

If you're trying to download via @finos/perspective to solve the issues, you might just run into more issues with the dependencies. Usually, the problems for npm install regarding this setup is one or all of the three below:

If you're in a mac environment experiencing this problem, there could be a few areas of conflict

  1. Make sure you are using the correct nvm version
    $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    $ nvm install v11.0.0
    $ nvm use v11.0.0

  2. Npm is probably not mapped to python locally, so it cannot find an executable python during 'npm install'. This is stated in the debugging portion of the guide. For most installations python is located at /usr/bin/python
    $ npm config set /usr/bin/python

  3. Npm install fails on node-gyp rebuild with "gyp: No Xcode or CLT version". You can simply remove the older version and reinstall
    (npm install fails on node-gyp rebuild with "gyp: No Xcode or CLT version detected!" schnerd/d3-scale-cluster#7)
    $ sudo rm -rf /Library/Developer/CommandLineTools
    $ xcode-select --install

@preyalameta02
Copy link

@Nikhilvish04
After trying all steps i am getting this new error.
error
can u please help.

hey, preyal this side, have you resolved the issue?
i am still facing the same issue.

@vishwakarmanikhil
Copy link

vishwakarmanikhil commented Sep 3, 2021

@preyalameta02 In the error it is showing that react keyword is not recognized by the compiler. That's why it's giving this error. you have to import react module. If you have imported then check if modules are correctly installed or not.

Deleted the package-lock.json file & then run

npm install

still face the issue than try to debug with below page
https://stackoverflow.com/questions/44439205/cant-resolve-module-not-found-in-react-js

@preyalameta02
Copy link

@preyalameta02 In the error it is showing that react keyword is not recognized by the compiler. That's why it's giving this error. you have to import react module. If you have imported then check if modules are correctly installed or not.

Deleted the package-lock.json file & then run

npm install

still face the issue than try to debug with below page
https://stackoverflow.com/questions/44439205/cant-resolve-module-not-found-in-react-js

thanks man, will try this out, really appreciate it

@notreyreyes
Copy link

@tanay-nagarsheth this package has been moved to @finos/perspective try npm i @finos/perspective and update it in src/Graph.tsx and package.json

YES THIS!! WORKED! THANK YOU!!!

@anipaul2
Copy link

Change Line 2 of src/Graph.tsx to: import { Table } from '@finos/perspective'; For Mac environment.

and for windows?

@preyalameta02
Copy link

preyalameta02 commented Jan 30, 2022 via email

@anipaul2
Copy link

@jpmorganchase/perspective is working on windows. Try again by importing code from another repository.

On Sun, 30 Jan, 2022, 2:15 pm Aniketh Paul, @.> wrote: Change Line 2 of src/Graph.tsx to: import { Table } from @./perspective'; For Mac environment. and for windows? — Reply to this email directly, view it on GitHub <#47 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS5ZJQEKP6CGT47I3VAJI6TUYT3BZANCNFSM4MQVWAVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

ok cool

@noviicee
Copy link

noviicee commented Feb 1, 2022

So I encountered a similar problem and it was due to npm install.
I am on ubuntu, and there is usually python 2.7 installed on many linux versions including ubuntu.
However my machine did not have python pre-installed and therefore running npm install produced errors because it could not map to the python packages, and ultimately gave the same error as mentioned above on running npm start. Notice if you are getting a similar error like so.

Just check if python is present in your machine or not by exceuting python --version on your terminal. If python is not present, then better to install it using sudo apt-get install python. After that if you again execute python --version` on your terminal, you'll see that python 2.x will be present.

One thing which I tried to do here is to install npm in a different python version by using npm install --python=python3.8.10 , because python3 is present on my machine but it did not work.

Everything worked fine after I did this. If it still does not solve the problem then the above approaches might be of help :)

The first step is to run the server file,
second to check the correct nvm versions while using (as mentioned in the guide)
third, to execute npm install without any errors.

@akalam1
Copy link

akalam1 commented Jun 14, 2022

whoever still stuck and couldnt find any solution, try this, it worked for me, hope it works for u...
cd datafeed

once you are there do:
npm install
once u do that, do the following:
npm install --ignore-scripts

Finally Run the main script:

npm start

This should work....

mainly for python3++

@PreciousJac0b
Copy link

@akalam1 I am facing a similar issue with task 3. After installing the finos and all.I am facing an error with the DataManipulator imported. Did you encounter this?

@loannejee
Copy link

What worked for me is entering this all at once:
npm install react react-dom @finos/perspective --save
Then:
Go to the Graph.tsx file and replace
import { Table } from '@jpmorganchase/perspective';
with
import { Table } from '@finos/perspective';

@PreciousJac0b
Copy link

Great!
What worked for me was running npm install without nvm, I used the nodejs route and it worked!

@iamsahil08
Copy link

What worked for me is entering this all at once: npm install react react-dom @finos/perspective --save Then: Go to the Graph.tsx file and replace import { Table } from '@jpmorganchase/perspective'; with import { Table } from '@finos/perspective';

Type error: Argument of type 'Row[]' is not assignable to parameter of type 'TableData'.
Type 'Row[]' is not assignable to type 'Record<string, (string | number | boolean | Date)[]>[]'.
Type 'Row' is not assignable to type 'Record<string, (string | number | boolean | Date)[]>'.
Index signature is missing in type 'Row'. TS2345

52 |     if (this.table) {
53 |       this.table.update(

54 | DataManipulator.generateRow(this.props.data),
| ^
55 | );
56 | }
57 | }

Getting this error which I'm not able to resolve. Can you help.

@PreciousJac0b
Copy link

This is the exact problem I experienced. Install npm via the node js route not nvm. And do not replace @jpmorganchase perspective with @finos for task 3. Goodluck!

@iamsahil08
Copy link

How to install npm via the node js route?

@PreciousJac0b
Copy link

@iamsahil08
Copy link

How to install npm via the node js route?

It says package-lock.json file was created with an old version of npm.

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! invalid options argument

@harshabindana
Copy link

harshabindana commented Aug 24, 2022

Appears that jpmorganchase/perspective is missing

(copy link urls and paste in browser)
replace existing with:
https://drive.google.com/file/d/1amF7C-4mRZCi3Ab5xuH0XCRQubp4aa_t/view

Page 20 for more:
https://cdn.theforage.com/vinternships/companyassets/Sj7temL583QAYpHXD/setup_devenv_m2_v8.pdf

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