1

I have cloned the VegaEmbed repo where I am supposed to perform yarn which succeeds with the following output:

yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "win32" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ beemo create-config
[1] CONFIG Creating config files (476ms)

Then, I am supposed to perform yarn build which fails with the following output:

yarn run v1.22.10
$ yarn clean && yarn build:style
$ del build build-es5 src/style.ts
Parameter format not correct - "style.ts".
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS C:\Users\hmiri\Downloads\VegaEmbed> yarn      
yarn install v1.22.10
[1/4] Resolving packages...
success Already up-to-date.
$ beemo create-config
[1] CONFIG Creating config files (416ms)

Searching for the keywords of the error message does not bring up any useful instructions on how to resolve this error.

When I search for style.ts I get a hit in my package.json as follows:

"scripts": {
    "prebuild": "yarn clean && yarn build:style",
    "build": "rollup -c",
    "build:style": "./build-style.sh",
    "clean": "del build build-es5 src/style.ts",
    "prepublishOnly": "yarn clean && yarn build",
    "preversion": "yarn lint && yarn test",
    "serve": "browser-sync start --directory -s -f build *.html",
    "start": "yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",
    "pretest": "yarn build:style",
    "test": "beemo jest --stdio stream",
    "test:inspect": "node --inspect-brk ./node_modules/.bin/jest --runInBand",
    "prepare": "beemo create-config",
    "prettierbase": "beemo prettier '*.{css,scss,html}'",
    "eslintbase": "beemo eslint .",
    "format": "yarn eslintbase --fix && yarn prettierbase --write",
    "lint": "yarn eslintbase && yarn prettierbase --check"
}

What's wrong in the clean section? Can someone please help me understand what needs to change there?

RobC
  • 22,977
  • 20
  • 73
  • 80
CatarinaRuna
  • 520
  • 4
  • 15

1 Answers1

3

The problem was that del is a windows command. We need to switch to del-cli. I fixed it in https://github.com/vega/vega-embed/commit/eaa96696e8f7c1a1f6950968a0f5494e6b73ce91.

dominik
  • 5,745
  • 6
  • 34
  • 45
  • Thank you! That was spot on. `yarn build` now works, though when I do `yarn start` afterward, I get another error. I will post a new question. I would appreciate your looking at it. – CatarinaRuna Aug 04 '21 at 06:19
  • [Here](https://stackoverflow.com/questions/68646351/yarn-start-failure-within-vega-embed) it is... – CatarinaRuna Aug 04 '21 at 09:53
  • Hi Dominik, We installed the latest `vega-embed` a couple of days ago, so we have the `6.18.2` version, but any attempt to import it into a TypeScript file in an Angular project crashes the app. We have been looking into it ever since and we think it might have something to do with transpiling the code, something like [this](https://www.gitmemory.com/issue/nuxt/nuxt.js/9221/830012118). Would you be able to take a look please; for instance, [this](https://stackoverflow.com/questions/68736883/import-statement-crashing-an-angular-app-despite-installed-module) post? – CatarinaRuna Aug 11 '21 at 07:58
  • 1
    Make sure to use a build system that supports optional chaining until https://github.com/vega/vega-lite/pull/7595 is released or use Vega-Lite 5.0.0. – dominik Aug 12 '21 at 12:56