blob: 3365c3883f15bddb2bc671cdfc4924c0157af90f [file] [log] [blame]
# Copyright 2019 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
workspace(name = "examples_parcel")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "94070eff79305be05b7699207fbac5d2608054dd53e6109f7d00d923919ff45a",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.2/rules_nodejs-5.8.2.tar.gz"],
)
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
build_bazel_rules_nodejs_dependencies()
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
# with node 16, this example fails on circleCI, because
# parcel has a gyp build on install that fails due to wrong
# version of the python interpreter:
# npm ERR! code 1
# npm ERR! path /tmp/tmp-22804uFaivyUQN3f5/node_modules/deasync
# npm ERR! command failed
# npm ERR! command sh -c node ./build.js
# npm ERR! gyp info it worked if it ends with ok
# npm ERR! gyp info using node-gyp@8.2.0
# npm ERR! gyp info using node@16.12.0 | linux | x64
# npm ERR! gyp ERR! find Python
# npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
# npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
# npm ERR! gyp ERR! find Python checking if "python3" can be used
# npm ERR! gyp ERR! find Python - executable path is "/usr/bin/python3"
# npm ERR! gyp ERR! find Python - version is "3.5.3"
# npm ERR! gyp ERR! find Python - version is 3.5.3 - should be >=3.6.0
# npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
node_version = "14.17.5",
)
load("@build_bazel_rules_nodejs//:index.bzl", "npm_install")
npm_install(
name = "npm",
package_json = "//:package.json",
package_lock_json = "//:package-lock.json",
)