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 es-pack-js when executing 'npm i' #44

Closed
letsgo0 opened this issue Aug 22, 2021 · 15 comments
Closed

error with es-pack-js when executing 'npm i' #44

letsgo0 opened this issue Aug 22, 2021 · 15 comments

Comments

@letsgo0
Copy link

letsgo0 commented Aug 22, 2021

Hope someone know this problem. I just clone this repo, cd three-geo and npm i, then comes this error below.

node ./postinstall.js

Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)

es-pack-js@0.5.2 postinstall D:\gisdemo8threejs\three-geo\node_modules\es-pack-js
(cd ./node-polyfill && npm run install); (cd ./rustwasm-polyfill && npm i);

此时不应有 (cd。
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\es-pack-js\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! es-pack-js@0.5.2 postinstall: (cd ./node-polyfill && npm run install); (cd ./rustwasm-polyfill && npm i);
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the es-pack-js@0.5.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

@canglangshushu
Copy link

Have you solved the problem yet?I ran into the same problem

@Bextia
Copy link

Bextia commented Nov 10, 2021

Same here, can't get the example running locally

@j-devel
Copy link
Contributor

j-devel commented Nov 11, 2021

To my knowledge, this error happens when building on Windows.

Using the latest es-pack-js (v0.5.3 with partial Windows support) might help:

$ npm config set script-shell bash
$ npm i es-pack-js@0.5.3
$ npm run build

Updates (2022-03-22): As of 36f0862, building three-geo on Windows should just work by

$ npm config set script-shell bash
$ npm run build

@Bextia
Copy link

Bextia commented Nov 17, 2021

yes, I'm working on Windows.

I've tried your proposed solution and got this error on the second command:

image

@sonicviz
Copy link

Hello.

Windows user here, same error.

npm run build

three-geo@1.4.6-dev3 build
es-pack build -m umd

/bin/bash: es-pack: command not found

Any clues?

@j-devel
Copy link
Contributor

j-devel commented Mar 24, 2023

/bin/bash: es-pack: command not found

Try npm i first?

@sonicviz
Copy link

Yes, already did fails.
Tried npm i es-pack-js@0.5.3 and fails.

Switching to WSL.

@j-devel
Copy link
Contributor

j-devel commented Mar 24, 2023

Yes, already did fails. Tried npm i es-pack-js@0.5.3 and fails.

Please try npm i es-pack-js@0.5.13 (latest version 0.5.13, not 0.5.3). Still fail?

@sonicviz
Copy link

I switched to WSL2, installed nvm, node etc according to https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl

All checks out, everything installed. Opened Geo in VScode in WSL via code .

Try npm i or npm i three-geo but it fails now on: npm ERR! /bin/bash: node: command not found

But node is installed.

node --version
v18.12.1

@j-devel
Copy link
Contributor

j-devel commented Mar 24, 2023

I switched to WSL2, installed nvm, node etc according to https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-wsl

All checks out, everything installed. Opened Geo in VScode in WSL via code .

Sorry, I am not familiar with the Windows environment...

FYI - latest CI build on Windows (via GitHub Action's Docker) https://github.com/w3reality/three-geo/actions/runs/4459639864/jobs/7832217785

@j-devel j-devel added the help wanted Extra attention is needed label Mar 24, 2023
@sonicviz
Copy link

sonicviz commented Mar 24, 2023

Apologies. my mistake. I had skipped a step and VScode wasn't fully hooking into WSL when I booted the project.

Fixed it, and it's all working fine under WSL2 as per your original docs (after installing node etc as per MS instructions above).

Thanks for the help, sounding board helps troubleshoot. Sorry to bother you, but at least you can add some extra instructions perhaps for WIndows users now to use WSL. Microsoft actually recommends this for js development now anyway, so all good.

Looking forward to having a play with it, some great work you've done there!

You might be interested in what I want to add actually, could be a useful addition.
Haven't done three.js for a while so kind of starting from scratch again.

@j-devel
Copy link
Contributor

j-devel commented Mar 25, 2023

@sonicviz I have added some notes regarding this.

Thanks for your interest, and looking forward to seeing enhancements!

@sonicviz
Copy link

No problem.

Q: How do you calculate terrain height relative to the position units in three.js, which are also dependant on the zoom factor?

For example, if I want to position an object 1m above sea level (which according to https://docs.mapbox.com/data/tilesets/guides/access-elevation-data/#mapbox-terrain-rgb sea level is 0) how do I translate that into a relative mesh position,z value that will translate it a unit of 1m (or 10m or whatever) relative to the scale of the mesh terrain elevation?

Also. how does that position calculation change based on the zoom factor, which can be from 11 to 17?

@j-devel
Copy link
Contributor

j-devel commented Mar 27, 2023

Q: How do you calculate terrain height relative to

Okay, I think this is a different issue topic. Could you open a new thread?

@j-devel j-devel closed this as completed Mar 27, 2023
@j-devel j-devel removed the help wanted Extra attention is needed label Mar 27, 2023
@sonicviz
Copy link

aok, done. ty

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

5 participants