react-vega-lite
react-vega-lite copied to clipboard
Cannot find module: 'vega'. Make sure this package is installed.
I've been using react-vega-lite for a while. My package.json had:
"react-vega-lite": "^2.0.2",
"vega-lib": "^4.4.0",
"vega-lite": "^3.0.0-rc12",
"vega-tooltip": "^0.15.0"
I'm not sure what changed, but today I started getting Cannot find module: 'vega'. Make sure this package is installed.
. I get this error with gcloud app deploy
and not docker-compose up --build
.
If I add vega
to package.json
, gcloud app deploy
works.
Should vega
be added to Install section?
gcloud app deploy
logs:
~/data-explorer/ui (mc/card-header): gcloud app deploy --quiet
Services to deploy:
descriptor: [/usr/local/google/home/melchang/data-explorer/ui/app.yaml]
source: [/usr/local/google/home/melchang/data-explorer/ui]
target project: [test-data-explorer]
target service: [default]
target version: [20190306t150752]
target url: [https://test-data-explorer.appspot.com]
Beginning deployment of service [default]...
Building and pushing image for service [default]
Started cloud build [3a9d5989-69c6-471f-b1f4-f5489869e6d4].
To see logs in the Cloud Console: https://console.cloud.google.com/gcr/builds/3a9d5989-69c6-471f-b1f4-f5489869e6d4?project=317832653419
----------------------------- REMOTE BUILD OUTPUT ------------------------------
starting build "3a9d5989-69c6-471f-b1f4-f5489869e6d4"
FETCHSOURCE
Fetching storage object: gs://staging.test-data-explorer.appspot.com/us.gcr.io/test-data-explorer/appengine/default.20190306t150752:latest#1551913676024402
Copying gs://staging.test-data-explorer.appspot.com/us.gcr.io/test-data-explorer/appengine/default.20190306t150752:latest#1551913676024402...
/ [1 files][ 11.0 MiB/ 11.0 MiB]
Operation completed over 1 objects/11.0 MiB.
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
Sending build context to Docker daemon 17.94MB
Step 1/12 : FROM node:9.6.1 as builder
9.6.1: Pulling from library/node
4176fe04cefe: Pulling fs layer
851356ecf618: Pulling fs layer
6115379c7b49: Pulling fs layer
aaf7d781d601: Pulling fs layer
936f8420f2e4: Pulling fs layer
eab82fe5fcf4: Pulling fs layer
da559c7b52e5: Pulling fs layer
c61f5df9eaef: Pulling fs layer
aaf7d781d601: Waiting
936f8420f2e4: Waiting
eab82fe5fcf4: Waiting
da559c7b52e5: Waiting
c61f5df9eaef: Waiting
851356ecf618: Verifying Checksum
851356ecf618: Download complete
6115379c7b49: Verifying Checksum
6115379c7b49: Download complete
4176fe04cefe: Verifying Checksum
4176fe04cefe: Download complete
936f8420f2e4: Verifying Checksum
936f8420f2e4: Download complete
eab82fe5fcf4: Verifying Checksum
eab82fe5fcf4: Download complete
c61f5df9eaef: Verifying Checksum
c61f5df9eaef: Download complete
aaf7d781d601: Verifying Checksum
aaf7d781d601: Download complete
da559c7b52e5: Verifying Checksum
da559c7b52e5: Download complete
4176fe04cefe: Pull complete
851356ecf618: Pull complete
6115379c7b49: Pull complete
aaf7d781d601: Pull complete
936f8420f2e4: Pull complete
eab82fe5fcf4: Pull complete
da559c7b52e5: Pull complete
c61f5df9eaef: Pull complete
Digest: sha256:ca12dd0664cba60c0dee18fb0cfa73336285f0d0ac915d61cb1c8a04aa0f74e6
Status: Downloaded newer image for node:9.6.1
---> 29831ba76d93
Step 2/12 : WORKDIR /ui
---> Running in 19817a3012bc
Removing intermediate container 19817a3012bc
---> fdc83768e03d
Step 3/12 : ENV PATH /ui/node_modules/.bin:$PATH
---> Running in a8f94dd3ea82
Removing intermediate container a8f94dd3ea82
---> 126a22dc8db2
Step 4/12 : COPY package.json /ui/package.json
---> d934758d9a6d
Step 5/12 : COPY src/api /ui/src/api
---> 659049c56af6
Step 6/12 : RUN npm install
---> Running in 3354e43aa456
npm WARN deprecated [email protected]: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN notice [SECURITY] superagent has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=superagent&version=3.5.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN deprecated [email protected]: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers
> [email protected] install /ui/node_modules/husky
> node ./bin/install.js
husky
setting up Git hooks
can't find .git directory, skipping Git hooks installation
> [email protected] install /ui/node_modules/puppeteer
> node install.js
Chromium downloaded to /ui/node_modules/puppeteer/.local-chromium/linux-637110
> [email protected] postinstall /ui/node_modules/jss
> node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"
Love JSS? You can now support us on open collective:
> https://opencollective.com/jss/donate
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @material-ui/[email protected] requires a peer of @material-ui/core@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of vega-lite@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm added 2407 packages in 83.909s
WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
Removing intermediate container 3354e43aa456
---> 99b2d3c74858
Step 7/12 : RUN npm install [email protected] -g
---> Running in 32f1ad34b00f
npm WARN deprecated [email protected]: This release contains bugs. Please update to [email protected] instead.
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated [email protected]: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN notice [SECURITY] webpack-dev-server has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=webpack-dev-server&version=3.1.9 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
/usr/local/bin/react-scripts -> /usr/local/lib/node_modules/react-scripts/bin/react-scripts.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/react-scripts/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/react-scripts/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ [email protected]
added 1922 packages in 40.24s
Removing intermediate container 32f1ad34b00f
---> b5dacd5c2ec0
Step 8/12 : COPY . /ui
---> b8da3dd833cc
Step 9/12 : RUN npm run build
---> Running in 9590a6623a63
> [email protected] build /ui
> react-scripts build
Creating an optimized production build...
Failed to compile.
./node_modules/vega-lite/build/src/spec/base.js
Cannot find module: 'vega'. Make sure this package is installed.
You can install this package by running: npm install vega.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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:
npm ERR! /root/.npm/_logs/2019-03-06T23_12_04_451Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: exit status 1
--------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/gcr/builds/3a9d5989-69c6-471f-b1f4-f5489869e6d4?project=317832653419 Failure status: UNKNOWN: Error Response: [2] Build failed; check build logs for details