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

Error with topojson on npm install #2005

Closed
countfak opened this issue Jan 17, 2021 · 6 comments · Fixed by #2037
Closed

Error with topojson on npm install #2005

countfak opened this issue Jan 17, 2021 · 6 comments · Fixed by #2037

Comments

@countfak
Copy link

Hi, I have the following error when installing Turf 6.2.0 with npm install:

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /app/node_modules/topojson/node_modules/topojson-server/bin/geo2topo
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/app/node_modules/topojson/node_modules/topojson-server/bin/geo2topo'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

I have no issues when installin with yarn install.
Tried with both node 14 and 15.
I'm on macos, but I get the same error when building my application with docker.

@rowanwins
Copy link
Member

Hi @marcofacheris

I just ran npm install @turf/turf on mac with node v14 and didn't get any errors.

It did throw a warning saying

npm WARN deprecated topojson@3.0.2: Use topojson-client, topojson-server or topojson-simplify directly

but the install continued successfully. I can also see the file /topojson/node_modules/topojson-server/bin/geo2top in my install directory.

🤷‍♂️

@LucaIaconelli
Copy link

same problem here

@andy-harney
Copy link

I have the same issue here trying to upgrade to 6.3.0.
Running Node v15.6.0 on Ubuntu 20.04.

❯ npm install @turf/turf@latest
npm WARN deprecated topojson@3.0.2: Use topojson-client, topojson-server or topojson-simplify directly.
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /xxx/xxx/xxx/node_modules/topojson/node_modules/topojson-server/bin/geo2topo
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/xxx/xxx/xxx/node_modules/topojson/node_modules/topojson-server/bin/geo2topo'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/xxx/.npm/_logs/2021-01-22T15_50_26_409Z-debug.log

I also see the file in node_modules/topojson/node_modules/topojson-server/bin/geo2topo, but the install won't work.
I've tried removing all the packages and starting clean, but still no joy.

I can selectively pick out the modules I need individually so not so pressing for me.

Thank you for the great library, my work would not be possible without it.

@rowanwins
Copy link
Member

The answer is to probably update the module/s which rely on topojson

@zdm
Copy link

zdm commented Jan 28, 2021

  1. This issue is only for npm v7, because npm7 trying to install deps to the top node_modules directory, but topojson has hardcoded paths, that points to it's own node_modules;
  2. topojson was deprecated and should be replaced with topojson-client, topojson-server;

@danielkbx
Copy link

Same here, npm v7.

elliots added a commit to elliots/turf that referenced this issue Feb 18, 2021
fixes Turfjs#2005 (allowing import with node 15/npm 7)
rowanwins pushed a commit that referenced this issue Feb 18, 2021
fixes #2005 (allowing import with node 15/npm 7)
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

Successfully merging a pull request may close this issue.

6 participants