insidesherpa / JPMC-tech-task-2

29 stars 201 forks source link

Type error: Cannot find module '@jpmorganchase/perspective'. TS2307 #24

Closed lunakoj closed 4 years ago

lunakoj commented 4 years ago

I checked the nom start like advised on another issue report and it didn't help as npm shows to start up quite well localhost 3000

jbf-insidesherpa commented 4 years ago

@lunakoj you're probably getting that error because npm install wasn't completing successfully on your end. Can you attach a screenshot of what errors you're getting on your console after you run npm install? The setup slides also discuss the workarounds for most issues a user might get when running npm install

lunakoj commented 4 years ago

Thank you for your response. Attached are the error screen while installing NPM as requested. I look forward to a resolution so I can carry on with the task. Warm Regards  Olisa Okeke On Monday, January 27, 2020, 12:29:06 AM UTC, jbf-insidesherpa notifications@github.com wrote:

@lunakoj you're probably getting that error because npm install wasn't completing successfully on your end. Can you attach a screenshot of what errors you're getting on your console after you run npm install? The setup slides also discuss the workarounds for most issues a user might get when running npm install

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

debarshikundu commented 4 years ago

I am actually getting the same error :(

image

surbhi1005 commented 4 years ago

Hi debarshikundu, did you find any solution for the problem since I have the same problem and can't resolve it.

tanay-nagarsheth commented 4 years ago

did anyone find the solution to this? I have installed npm correctly , everything is right but this error wont stop showing Type error: Cannot find module '@jpmorganchase/perspective'. TS2307

PoojaRani24 commented 4 years ago

Make sure you are using the correct node version. Using nvm use v11.0.0 followed by sudo npm install worked for me

yash-kedia commented 4 years ago

nvm use v11.0.0 is not working for me

exit status 1: 'C:\Users\Yash' is not recognized as an internal or external command, operable program or batch file.

can anyone tell me how to resolve this error

nicoestrada commented 4 years ago

I have also ran into this error. Any ideas on the solution?

TanishB commented 4 years ago

You can skip npm install step by downloading the node_modules from here. And replace the node_modules folder inside JPMC-tech-task-2-PY3 with the one you downloaded from the link mentioned above. Now you just need to execute npm start!

PrajolADSethi commented 4 years ago

@TanishB I tried your method but its not working for me Can you tell me if i should uninstall anything more than the npm ? Earlier I followed the steps given in the instruction manual

TanishB commented 4 years ago

@PrajolADSethi You don't need to uninstall anything. By replacing node_modules you are skipping the npm install step, that's it.

PrajolADSethi commented 4 years ago

Okay Thank you @TanishB but still changing the node folder didn't work for me

akshatgupta1019 commented 4 years ago

i am facing the same issue! did anyone got the solution?

ikshitjalan commented 4 years ago

i am facing this same issue too How to resolve it?

sujith8897 commented 4 years ago

same issue please help

ghost commented 4 years ago

same issue, can't get a response from the online help!

sujith8897 commented 4 years ago

I got the answer to the issue.. Download node modules file from the comments above and then npm install react-scripts by using this i am able to solve this

RudraPaksh commented 4 years ago

Failed to compile C:/Users/asus1/JPMC-tech-task-2/src/Graph.tsx Type error: Cannot find module '@jpmorganchase/perspective'. TS2307

1 | import React, { Component } from 'react';

2 | import { Table } from '@jpmorganchase/perspective'; | ^ 3 | import { ServerRespond } from './DataStreamer'; 4 | import './Graph.css'; 5 | This error occurred during the build time and cannot be dismissed.

i am getting this error please tell me how can i resolve this error

RudraPaksh commented 4 years ago

same issue, can't get a response from the online help!

gthe1andonly commented 4 years ago

I don't know if this will help anyone, but I went to the node js site and downloaded it as if i was installing a basic application on my computer. Then i did the npm install and nmp start agaain.

sumthegreat commented 4 years ago

I am also having the same issue.

C:/Users/../JPMC-tech-task-2-PY3/src/Graph.tsx Type error: Cannot find module '@jpmorganchase/perspective'. TS2307

1 | import React, { Component } from 'react';

2 | import { Table } from '@jpmorganchase/perspective'; | ^ 3 | import { ServerRespond } from './DataStreamer'; 4 | import './Graph.css'; 5 |

deepaa28 commented 4 years ago

same issue, please help!

gthe1andonly commented 4 years ago

https://nodejs.org/en/download/

please try to download node js using the link above and see if it helps you. Then go through the process again as shown on the slides.

parthsikka commented 4 years ago

@TanishB rightly said. Try downloading the node_modules folder from here and replace it with the one in your Task 2 folder. Now directly jump to npm start

Prannesh45 commented 4 years ago

For all the users, who have the error Just go to visual studio 2017 and run VS 2017 terminal Once you enter, move to the directory where you have saved JPMC-tech-task Delete the folder node_modules Being in the 2017 VS command prompt, run "npm install " It will take around 153 MB download And then run "npm start", it will work

divyanshu450 commented 4 years ago

This option really worked for me. I don’t know exactly what the problem was but it was definitely not related with setting up path environments in my case.

govilharsh commented 4 years ago

Can we use visual studio 2019 ?

Prannesh45 commented 4 years ago

Your nvm version and this vs should match, so node_gyp error can be prevented. So we can't use it. If we use, node_gyp error might occur.

govilharsh commented 4 years ago

Thanx a lot !!! Its working now.

aman-5757 commented 4 years ago

nvm use v11.0.0 is not working for me

exit status 1: 'C:\Users\Yash' is not recognized as an internal or external command, operable program or batch file.

can anyone tell me how to resolve this error

Hii try this --> cd/Users/ --> then run dir /x --> You will get something like YASH~1 (In my case it was AMANSR~1) --> then try again using the same eg. C:\Users\YASH~1 instead of C:\Users\YASH

aman-5757 commented 4 years ago

image

I am facing error in command npm install --> can someone please help me!

vaisakh-123 commented 4 years ago

https://drive.google.com/uc?id=1amF7C-4mRZCi3Ab5xuH0XCRQubp4aa_t&export=download

Download the zip file from the link.Extract it to JPMC-tech-task-2-PY3. Run 'npm start' in cmd. No need to use 'npm install' in this case.

Nakzz commented 4 years ago

https://drive.google.com/uc?id=1amF7C-4mRZCi3Ab5xuH0XCRQubp4aa_t&export=download

Download the zip file from the link.Extract it to JPMC-tech-task-2-PY3. Run 'npm start' in cmd. No need to use 'npm install' in this case.

Not sure if that's a good idea, at least for developing in a project that could be used in different devices.

npm install installs the packages and pre-reqs for those packages depending on the machine you are using. Although you are able to solve it by pasting someone else's node_modules files, you shouldn't want to just paste it in your directory. That's a major security threat.

I was able to solve the problem with the following

npm install -g node-gyp node-pre-gyp
npm install --unsafe-perm

But this isn't the solution for all the people who posted their screens or their error messages. Some people are having permission issue and some are having issue with your npm not being able to find your python executable.

Anamika0101 commented 4 years ago

image Using node_modules provided here, i tried npm start and now this is the error. I am trying to work on this since yesterday and there is always some error.

gthe1andonly commented 4 years ago

run npm start from the task folder and not the node modules folder. You might still get a dfferent error though

Anamika0101 commented 4 years ago

I did try that also, same error exist.

Prannesh45 commented 4 years ago

Delete node_modules and try again with setting VS terminal to 2017 Being in the 2017 VS command prompt, run "npm install " It will take around 153 MB download And then run "npm start", it will work this error is mostly because of your python version linkage with Vs Version

Anamika0101 commented 4 years ago

Delete node_modules and try again with setting VS terminal to 2017 Being in the 2017 VS command prompt, run "npm install " It will take around 153 MB download And then run "npm start", it will work this error is mostly because of your python version linkage with Vs Version

image image I tried and again there is problem!

Prannesh45 commented 4 years ago

I would like you to try out this prebuild-install || node-gyp, try this command and then check in the path directory whether the python path(where you have installed python) is included Before set can be achieved by searching path in start menu and selecting edit the system env variables and select environment variables and select path in the second list box. Select the path and add the python.exe location

Anamika0101 commented 4 years ago

I would like you to try out this prebuild-install || node-gyp, try this command and then check in the path directory whether the python path(where you have installed python) is included Before set can be achieved by searching path in start menu and selecting edit the system env variables and select environment variables and select path in the second list box. Select the path and add the python.exe location

Still not working

eakarakaplan commented 4 years ago

For all the users, who have the error Just go to visual studio 2017 and run VS 2017 terminal Once you enter, move to the directory where you have saved JPMC-tech-task Delete the folder node_modules Being in the 2017 VS command prompt, run "npm install " It will take around 153 MB download And then run "npm start", it will work

I worked for me. Thanks.

yasharth291 commented 4 years ago

nvm use v11.0.0 is not working for me

exit status 1: 'C:\Users\Yash' is not recognized as an internal or external command, operable program or batch file.

can anyone tell me how to resolve this error

It is because of the space coming in your path.

samrojo commented 4 years ago

You can skip npm install step by downloading the node_modules from here. And replace the node_modules folder inside JPMC-tech-task-2-PY3 with the one you downloaded from the link mentioned above. Now you just need to execute npm start!

Actually just adding the @jpmorganchase folder to the node_modules will do the work. Thanks for it!

neelabhkrishna commented 4 years ago

npm i --save @finos/perspective-viewer @finos/perspective-viewer-d3fc @finos/perspective-viewer-datagrid

PrajolADSethi commented 4 years ago

Hello so some weeks back I was facing the same issues of react and have overcome it and would like to share with you all Note : 1.Reclone the repository you are working on and delete the previous one

  1. If using windows use the directory C:/Users/public//
  2. Don't use space in your file name
  3. Verify that you are using python version 2.7 or 3+ ; node version 6 ; nvm version 1.1.8 or a nearby one , npm version 11.0.0 and visual studios 2017
  4. Make sure that while installing visual studios you clicked all options as guided in the ppt . Now, After these verifications let's first setup the server side : 1.Open CMD
  5. change directory to where your repository is then make sure you are in the repository . 3 . Run the python3 datafeed/server3.py command (If you get a dateutil error then either you write python3 as python itself and run still not working and you have pip installed already then install wheel package and then run ) After the port 8080 gets set now client side : 1.Open CMD (Administrator)
  6. cd to desired location
  7. check nvm version you installed
  8. Follow the steps as in ppt
  9. Use nvm 11.0.0 6.config...2017 command 7.npm start Now if you are running into same type script errors 1 use the install command again
  10. After a while it may show you steps to fix audits run that and again force audit steps
  11. Run 5,6,7 step again still not working see if it is asking to install some packages like bootstrap and so
  12. Again install fix audits and rerun this time it may get no compilation error and you might see the blue button on the local host page .

I hope this steps may help you as it worked in my case so All the best 👍

FedericoRead commented 4 years ago

You can skip npm install step by downloading the node_modules from here. And replace the node_modules folder inside JPMC-tech-task-2-PY3 with the one you downloaded from the link mentioned above. Now you just need to execute npm start!

Thanks man, downloading the zip file worked for me... after doing a few extra steps. Apparently, if I try to copy the node_modules folder (from the .zip folder) into the JPMC-tech-task-2 folder it takes an eternity (literally, while copying it my computer said it would take more than a day then stopped at 10%). I just copied the zip folder, deleted the original node_modules folder, then moved the new node_modules folder (inside the zip file) into the JMPC-tech-task-2 directory.

However, for some reason it won't go through because it's complaining about react-scripts not being an internal or external command or whatever, so what I did was delete the original react-scripts folder in the new node_modules folder then installed react-scripts again (npm i react-scripts). This fixed the type error, but then it complained about not finding a require-from-string module. So I installed that in a similar fashion (npm install --save require-from-string), did npm install, and then npm start, and then it worked! I have been struggling on this for weeks and I'm glad I was finally able to fix it.

nakul2478 commented 4 years ago

20200612_213107 Using node_modules provided here, i tried npm start and now this is the error. I am trying to work on this since yesterday and there is always some error.

samrojo commented 4 years ago

20200612_213107 Using node_modules provided here, i tried npm start and now this is the error. I am trying to work on this since yesterday and there is always some error.

Hace you tried "npm start" instead of "react-scripts start"?, Don't really know if that would work, I was using it on windows. Or try using sudo

buyrenagesh commented 4 years ago

Failed to compile C:/Users/buyre/JPMC-tech-task-3-PY3/src/Graph.tsx Type error: Cannot find module '@jpmorganchase/perspective'. TS2307

1 | import React, { Component } from 'react';

2 | import { Table } from '@jpmorganchase/perspective'; | ^ 3 | import { ServerRespond } from './DataStreamer'; 4 | import { DataManipulator } from './DataManipulator'; 5 | import './Graph.css'; This error occurred during the build time and cannot be dismissed.

7Kushal commented 4 years ago

You can skip npm install step by downloading the node_modules from https://drive.google.com/file/d/1amF7C-4mRZCi3Ab5xuH0XCRQubp4aa_t/view And replace the node_modules folder in JPMC-tech-task-2-PY3. then run npm start if it shows error for react-scripts then run this command npm i -g react-scripts then runnpm start that helped for me.