I am trying to setup for the first time bazel with rules_nodejs on the dummy project.
The project structure is organised as follows:
The folder app1 contains NODE application and the folder app2 will be a GO based application.
The index.js is a very simple application:
const _ = require("lodash");
const numbers = [1, 5, 8, 10, 1, 5, 15, 42, 5];
const uniqNumbers = _.uniq(numbers);
console.log(uniqNumbers);
Running the application with the command:
bazel run //app1
it shows the error message:
ERROR: An error occurred during the fetch of repository 'app1':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_developer/de6f8818d27e2451d76ec34773e78a6e/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 965, column 13, in _yarn_install_impl
fail("yarn_install failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: yarn_install failed: yarn install v1.22.11
[1/4] Resolving packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
(error Couldn't find any versions for "lodash" that matches "ˆ4.17.21"
)
ERROR: /Users/developer/node/bazel_play/WORKSPACE.bazel:22:13: fetching yarn_install rule //external:app1: Traceback (most recent call last):
File "/private/var/tmp/_bazel_developer/de6f8818d27e2451d76ec34773e78a6e/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 965, column 13, in _yarn_install_impl
fail("yarn_install failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: yarn_install failed: yarn install v1.22.11
[1/4] Resolving packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
(error Couldn't find any versions for "lodash" that matches "ˆ4.17.21"
)
ERROR: /Users/developer/node/bazel_play/app1/BUILD.bazel:3:14: //app1:app1 depends on #app1//lodash:lodash in repository #app1 which failed to fetch. no such package '#app1//lodash': yarn_install failed: yarn install v1.22.11
[1/4] Resolving packages...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
(error Couldn't find any versions for "lodash" that matches "ˆ4.17.21"
)
ERROR: Analysis of target '//app1:app1' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.591s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (1 packages loaded, 0 targets configured)
I assume the problem is the lodash module is missing. How can I do yarn install with bazel command?
All source files can be found here:
https://github.com/softshipper/bazel_play
And also could anyone please explain the purpose of yarn_install rule?
Related
I made a app with create-remix and I chose to use Cloud Flare Pages. Made the app but when I run npm run dev I get a error. I am on the latest node version (v17.3.1). I get this error the first time I run the dev script:
Watching Remix app in development mode...
Compiling worker to "/tmp/functionsWorker.js"...
✘ [ERROR] Could not resolve "../build"
functions/[[path]].js:4:23:
4 │ import * as build from "../build";
╵ ~~~~~~~~~~
1 error(s) and 0 warning(s) when compiling Worker.
Build failed with 1 error:
functions/[[path]].js:4:23: ERROR: Could not resolve "../build"
ERROR: "dev:wrangler" exited with 1.
Then if I run it again I get this error (probably because it builds the build folder the first time I run it before I get the error):
Watching Remix app in development mode...
Compiling worker to "/tmp/functionsWorker.js"...
✘ [ERROR] Could not resolve "../build"
functions/[[path]].js:4:23:
4 │ import * as build from "../build";
╵ ~~~~~~~~~~
1 error(s) and 0 warning(s) when compiling Worker.
Build failed with 1 error:
functions/[[path]].js:4:23: ERROR: Could not resolve "../build"
ERROR: "dev:wrangler" exited with 1.
Idk why I get this error as it is the default template. Thanks in advance.
I found out on the remix discord server that you need to downgrade versions to fix this. To do that just run npm install wrangler#beta
I've been using my Rails 6 app on Elastic Beanstalk for more than 6 months with no issue. Suddenly yesterday after deploying some changes the build started to fail due to it not being able to install NodeJs, which is not related to the changes I'd deployed earlier.
I have 01_download_nodejs and 02_install_nodejs commands for eb configs and they haven't been changed since I've setup the app for the first time around 6 months ago.
In cfn-init.log file it shows the following:
2021-10-02 08:46:19,017 [INFO] Command 01_download_nodejs succeeded
2021-10-02 08:46:23,515 [ERROR] Command 02_install_nodejs (yum -y install nodejs) failed
2021-10-02 08:46:23,516 [ERROR] Error encountered during build of prebuild_2_sst_app:
Command 02_install_nodejs failed
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 573, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 273, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command 02_install_nodejs failed
2021-10-02 08:46:23,516 [ERROR] -----------------------BUILD FAILED!------------------------
2021-10-02 08:46:23,516 [ERROR] Unhandled exception during build: Command
02_install_nodejs failed
Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 176, in <module>
worklog.build(metadata, configSets)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 135, in build
Contractor(metadata).build(configSets, self)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 561, in build
self.run_config(config, worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 573, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 273, in build
self._config.commands)
File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command 02_install_nodejs failed
In cfn-init-cmd.log file it shows the following:
2021-10-02 08:46:18,976 P22197 [INFO] Command 01_download_nodejs
2021-10-02 08:46:19,017 P22197 [INFO] Completed successfully.
2021-10-02 08:46:19,017 P22197 [INFO]
============================================================
2021-10-02 08:46:19,017 P22197 [INFO] Command 02_install_nodejs
2021-10-02 08:46:23,514 P22197 [INFO] -----------------------Command Output-----------------------
2021-10-02 08:46:23,515 P22197 [INFO] Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
2021-10-02 08:46:23,515 P22197 [INFO] No package nodejs available.
2021-10-02 08:46:23,515 P22197 [INFO] Error: Nothing to do
2021-10-02 08:46:23,515 P22197 [INFO] ------------------------------------------------------------
2021-10-02 08:46:23,515 P22197 [ERROR] Exited with error code 1
01_download_nodejs:
command: "curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo -E bash -"
02_install_nodejs:
command: "yum -y install nodejs"
Elastic Beanstalk Platform Version: 3.3.5
The issue you are probably having is due to expired SSL certificates, as described here: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-expired-certificate/
You can solve this with file in .ebextensions that installs the latest certificate. E.g, for Amazon Linux 1:
commands:
00_ssl_certs:
command: yum -y install https://cdn.amazonlinux.com/patch/ca-certificates-update-2021-09-30/ca-certificates-2018.2.22-65.1.24.amzn1.noarch.rpm
I'm using puppet 6.10.1 on Ubuntu 18.04.3 and when I run puppet agent -t on a server I get the below output
Info: Using configured environment 'dev'
Info: Retrieving pluginfacts
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve information from environment dev source(s) puppet:///pluginfacts
Info: Retrieving plugin
Error: /File[/opt/puppetlabs/puppet/cache/lib]: Could not evaluate: Could not retrieve information from environment dev source(s) puppet:///plugins
Notice: /File[/opt/puppetlabs/puppet/cache/lib/facter]: Dependency File[/opt/puppetlabs/puppet/cache/lib] has failures: true
Warning: /File[/opt/puppetlabs/puppet/cache/lib/facter]: Skipping because of failed dependencies
Warning: /File[/opt/puppetlabs/puppet/cache/lib/facter/facter_dot_d.rb]: Skipping because of failed dependencies
Warning: /File[/opt/puppetlabs/puppet/cache/lib/facter/package_provider.rb]: Skipping because of failed dependencies
Warning: /File[/opt/puppetlabs/puppet/cache/lib/facter/pe_version.rb]: Skipping because of failed dependencies
Warning: /File[/opt/puppetlabs/puppet/cache/lib/facter/puppet_settings.rb]: Skipping because of failed dependencies
...lots more skipping because of failed dependencies
Warning: /File[/opt/puppetlabs/puppet/cache/lib/puppet/type/file_line.rb]: Skipping because of failed dependencies
Info: Retrieving locales
Error: /File[/opt/puppetlabs/puppet/cache/locales]: Could not evaluate: Could not retrieve information from environment dev source(s) puppet:///locales
Notice: /File[/opt/puppetlabs/puppet/cache/locales/ja]: Dependency File[/opt/puppetlabs/puppet/cache/locales] has failures: true
Warning: /File[/opt/puppetlabs/puppet/cache/locales/ja]: Skipping because of failed dependencies
Warning: /File[/opt/puppetlabs/puppet/cache/locales/ja/puppetlabs-ntp.po]: Skipping because of failed dependencies
Warning: /File[/opt/puppetlabs/puppet/cache/locales/ja/puppetlabs-stdlib.po]: Skipping because of failed dependencies
Info: Loading facts
Info: Caching catalog for web-dev.domain.com
Info: Applying configuration version '1571827736'
Notice: Applied catalog in 0.01 seconds
I run with debug and the following strikes as interesting
Debug: HTTP GET https://puppetmaster01:8140/puppet/v3/file_metadata/pluginfacts returned 404 Not Found
Debug: HTTP GET https://puppetmaster01:8140/puppet/v3/file_metadata/plugins returned 404 Not Found
Debug: HTTP GET https://puppetmaster01:8140/puppet/v3/file_metadata/locales returned 404 Not Found
My site.pp
node 'default' {
include common
}
# agent
node /web[0-9]+-[a-zA-Z]+.domain.com/ {
package {
'openssh-server':
ensure => latest,
}
}
# not using regex to confirm that the FQDN is correct
node /web-dev.domain.com/ {
include common
}
Not sure where to go from here or why I'm getting the 404 errors
The issue here was mis-matched versions
My host is:
cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
The host setup was done as described here: http://docs.openstack.org/developer/tripleo-docs/environments/environments.html#virtual-environment up to the "Continue with Undercloud ..." step
The result:
sudo virsh list --all
Id Name State
----------------------------------------------------
3 baremetalbrbm_0 running
4 instack running
- baremetalbrbm_1 shut off
The undercloud setup was done as described here: http://docs.openstack.org/developer/tripleo-docs/installation/installation.html
The installation was attempted on the instack VM. Did the SSL setup as well.
Running
openstack undercloud install
fails with
+ puppet apply --detailed-exitcodes /etc/puppet/manifests/puppet-stack-config.pp Notice: Scope(Class[Tripleo::Firewall::Post]): At this stage, all network traffic is blocked. Warning: Scope(Class[Swift]): swift_hash_suffix has been deprecated and should be replaced with swift_hash_path_suffix, this will be removed Warning: Scope(Class[Nova::Keystone::Auth]): Note that service_name parameter default value will be changed to "Compute Service" (according future release. In case you use different value, please update your manifests accordingly. Warning: Scope(Class[Nova::Keystone::Auth]): Note that service_name_v3 parameter default value will be changed to "Compute Service v3" (acco in a future release. In case you use different value, please update your manifests accordingly. Warning: Scope(Class[Glance::Api]): The known_stores parameter is deprecated, use stores instead Warning: Scope(Class[Glance::Api]): default_store not provided, it will be automatically set to glance.store.filesystem.Store Warning: Scope(Class[Nova::Api]): In N cycle, enabled_apis will have to be an array of APIs to enable. Warning: Scope(Class[Neutron::Server]): identity_uri, auth_tenant, auth_user, auth_password, auth_region configuration options are deprecateted options Warning: Scope(Class[Neutron::Agents::Dhcp]): The dhcp_domain parameter is deprecated and will be removed in future releases Warning: Scope(Class[Heat]): Default value for rabbit_heartbeat_timeout_threshold parameter is different from OpenStack project defaults Warning: Scope(Class[Heat]): "admin_user", "admin_password", "admin_tenant_name" configuration options are deprecated in favor of auth_plugi Warning: Scope(Class[Nova::Network::Neutron]): neutron_auth_plugin parameter is deprecated and will be removed in a future release, use neut Error: Could not find class ::ironic::drivers::deploy for instack on node instack Error: Could not find class ::ironic::drivers::deploy for instack on node instack
+ rc=1
+ set -e
+ echo 'puppet apply exited with exit code 1' puppet apply exited with exit code 1
+ '[' 1 '!=' 2 -a 1 '!=' 0 ']'
+ exit 1 [2016-05-19 15:32:29,361] (os-refresh-config) [ERROR] during configure phase. [Command '['dib-run-parts', '/usr/libexec/os-refresh-config/cot status 1]
[2016-05-19 15:32:29,362] (os-refresh-config) [ERROR] Aborting... Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 987, in install
_run_orc(instack_env) File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 866, in _run_orc
_run_live_command(args, instack_env, 'os-refresh-config') File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 444, in _run_live_command
raise RuntimeError('%s failed. See log for details.' % name) RuntimeError: os-refresh-config failed. See log for details. Command 'instack-install-undercloud' returned non-zero exit status 1
Tried to install the ironic api as described here http://docs.openstack.org/developer/ironic/deploy/install-guide.html although to my understanding, this should not be necessary, since the undercloud was not installed on a baremetal machine.
Same result.
Some hours of Puppet readings later, I went into the /etc/puppet/modules/ironic/manifests/drivers folder and found, to no surprise, that the deploy class was not there. Perhaps it should not have been needed? I copied it from https://github.com/openstack/puppet-ironic/blob/master/manifests/drivers/deploy.pp and it seems to have got past the error originally reported. Fingers crossed.
Error occured while trying to build the recommendation engine using PredictionIO. Please anyone know how to solve this issue.
root#testing:~/PredictionIO/engines# pio build --verbose
[INFO] [Console$] Using command '/root/PredictionIO/sbt/sbt' at the current working directory to build.
[INFO] [Console$] If the path above is incorrect, this process will fail.
[INFO] [Console$] Uber JAR disabled. Making sure lib/pio-assembly-0.9.4.jar is absent.
[INFO] [Console$] Going to run: /root/PredictionIO/sbt/sbt package assemblyPackageDependency
[ERROR] [Console$] Error: Invalid or corrupt jarfile /root/PredictionIO/sbt/sbt-launch-0.13.7.jar
[ERROR] [Console$] Return code of previous step is 1. Aborting.
For me help to download this file
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.7/sbt-launch.jar
Rename downloaded file to sbt-launch-0.13.7.jar and replace previous file in PredictionIO/sbt/