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

Fails to run project locally - dependency error #4

Closed
UmutAlihan opened this issue May 9, 2020 · 8 comments
Closed

Fails to run project locally - dependency error #4

UmutAlihan opened this issue May 9, 2020 · 8 comments

Comments

@UmutAlihan
Copy link

UmutAlihan commented May 9, 2020

Installing dependencies, node_modules with "yarn"
Then command "yarn watch" throws the error below:

image

-------- Error Output:
/home/uad/dev/pose-animator/static_image.js:21:23: Cannot resolve dependency 'paper'

Server running at http://localhost:1234
🚨 /home/uad/dev/pose-animator/static_image.js:21:23: Cannot resolve dependency 'paper'
19 | import * as facemesh_module from '@tensorflow-models/facemesh';
20 | import * as tf from '@tensorflow/tfjs';
-> 21 | import * as paper from 'paper';
| ^
22 | import "babel-polyfill";
23 |
24 | import dat from 'dat.gui';

@pablo-mayrgundter
Copy link

I had this too, and not exactly sure what I did to fix it, but started with removing the third_party/paper reference from the package.json and then "npm update" again. Did this, along with the --no-source-maps arg to parsel, and got it running

@shyal
Copy link

shyal commented May 9, 2020

@pablo-mayrgundter

Did this, along with the --no-source-maps arg to parse

What do you mean by that?

@pablo-mayrgundter
Copy link

@pablo-mayrgundter

Did this, along with the --no-source-maps arg to parse

What do you mean by that?

There's an issue in the parcel library (#2). Here's the change to my package.json, after which I can run 'yarn watch' or 'yarn build' and serve up from a webserver from the dist directory.

"scripts": {
"watch": "cross-env NODE_ENV=development parcel index.html --no-source-maps --no-hmr --open ",
"build": "cross-env NODE_ENV=production parcel build index.html --no-source-maps --public-url ./",
"build-camera": "cross-env NODE_ENV=production parcel build camera.html --public-url ./",
"lint": "eslint .",
"link-local": "yalc link"
}

@shyal
Copy link

shyal commented May 9, 2020

That works. Thank you.

@Rinum
Copy link

Rinum commented May 10, 2020

These steps worked for me:

  1. Delete "paper" dependency row from package.json
  2. Add "--no-source-maps" to package.json "watch" script like pablo-mayrgundter described above
  3. Delete node_modules/paper
  4. npm install paper
  5. yarn watch

@pranayaryal
Copy link

@pablo-mayrgundter could you please send a pull request with your advice for the README.md file? Thanks.

@UmutAlihan
Copy link
Author

These steps worked for me:

1. Delete "paper" dependency row from package.json

2. Add "--no-source-maps" to package.json "watch" script like pablo-mayrgundter described above

3. Delete node_modules/paper

4. npm install paper

5. yarn watch

Yeap, this has solved my issue as well. Thank you very much!

@Lesliesibbs
Copy link

These steps worked for me:

1. Delete "paper" dependency row from package.json

2. Add "--no-source-maps" to package.json "watch" script like pablo-mayrgundter described above

"scripts": {
"watch": "cross-env NODE_ENV=development parcel index.html --no-source-maps --no-hmr --open ",
"build": "cross-env NODE_ENV=production parcel build index.html --no-source-maps --public-url ./",
"build-camera": "cross-env NODE_ENV=production parcel build camera.html --public-url ./",
"lint": "eslint .",
"link-local": "yalc link"
}

  1. Delete node_modules/paper

  2. npm install paper

  3. yarn watch

Yeap, this has solved my issue as well. Thank you very much!

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

6 participants