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

Build errors for from-scratch build of 0.0.21 #66

Closed
pablo-mayrgundter opened this issue Jul 24, 2021 · 8 comments
Closed

Build errors for from-scratch build of 0.0.21 #66

pablo-mayrgundter opened this issue Jul 24, 2021 · 8 comments

Comments

@pablo-mayrgundter
Copy link
Contributor

Hi Tom,

Trying to build from scratch.. everything goes well for awhile, then errors

There's a warning about using the right tsc.. hopefully it's just an env problem for me. The typescript lib is already installed, and I also tried using yarn, but same errors.

> [email protected] build-wasm-release
> em++ --bind -O3 -std=c++17 -flto -fno-exceptions ./src/wasm/web-ifc-api.cpp -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s FORCE_FILESYSTEM=1 -s EXPORT_NAME=WebIFCWasm -s MODULARIZE=1 -s EXPORTED_RUNTIME_METHODS=["FS"] -O3 -o dist/web-ifc.js


> [email protected] build-api
> cpy src/*.ts dist && npm run build-ts-api && npm run build-web-ifc-api-mjs && npm run build-web-ifc-api-node && npm run copy-to-dist && npm run add-wasm-path


> [email protected] build-ts-api
> tsc --emitDeclarationOnly && cpy dist/web-ifc-api.d.ts dist && cpy dist/web-ifc-api.d.ts dist --rename=web-ifc-api-node.d.ts
{
  "name": "web-ifc",
  "version": "0.0.21",
  "description": "ifc loading on the web",
  "main": "web-ifc-api.js",
  "watch": {
    "build-viewer": {
      "patterns": [
        "./examples/viewer"
      ],
      "extensions": "ts"
    },
    "build-web-ifc-api-mjs": {
      "patterns": [
        "./src"
      ],



                This is not the tsc command you are looking for


To get access to the TypeScript compiler, tsc, from the command line either:

- Use npm install typescript to first add TypeScript to your project before using npx
- Use yarn to avoid accidentally running code from packages which haven't been installed
Cannot copy `dist/web-ifc-api.d.ts`: the file doesn't exist
npm ERR! code 1
npm ERR! path /Users/pablo/web-ifc
npm ERR! command failed
npm ERR! command sh -c tsc --emitDeclarationOnly && cpy dist/web-ifc-api.d.ts dist && cpy dist/web-ifc-api.d.ts dist --rename=web-ifc-api-node.d.ts

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pablo/.npm/_logs/2021-07-24T08_32_02_049Z-debug.log
npm ERR! code 1
npm ERR! path /Users/pablo/web-ifc
npm ERR! command failed
npm ERR! command sh -c cpy src/*.ts dist && npm run build-ts-api && npm run build-web-ifc-api-mjs && npm run build-web-ifc-api-node && npm run copy-to-dist && npm run add-wasm-path

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pablo/.npm/_logs/2021-07-24T08_32_02_085Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@agviegas
Copy link
Collaborator

Hey Pablo, have you considered using Docker? We have just dockerized web-ifc. It's just a first version, but it should be easier if you're familiar with it. 🙂

@pablo-mayrgundter
Copy link
Contributor Author

Yeah, I use it occasionally.. I can try it. Better to have a hermetic build anyways

@agviegas
Copy link
Collaborator

Great! You can use the commands npm run docker-build and npm run docker-run. We'll upload this to docker-hub to make it even easier.

@vegarringdal
Copy link
Contributor

@pablo-mayrgundter

Sounds like npm install have failed some how, are you missing tsc under node_modules/.bin ?
Usually when I get errors that just fails for no good reason I just delete the node_modules folder and rerun npm install

@vegarringdal
Copy link
Contributor

vegarringdal commented Jul 24, 2021

hmm

This dependency probably will create issues...
This needs to be removed..

image

@vegarringdal
Copy link
Contributor

vegarringdal commented Jul 24, 2021

did a PR :-)
lets see if builds work...

@pablo-mayrgundter
Copy link
Contributor Author

did a PR :-)
lets see if builds work...

That did the trick, thanks!

@tomvandig
Copy link
Collaborator

Accepted PR and moved monaco dep to dev-deps, looks like the tsc dependency was just a typo so it could be deleted.

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

4 participants