Here is what I did on my mac:
brew install npm
sudo -H npm install -g meteorite
The outcome is:
$ sudo -H npm install -g meteorite
Password:
npm http GET https://registry.npmjs.org/meteorite
....
> meteorite#0.6.13 postinstall /usr/local/share/npm/lib/node_modules/meteorite
> sh ./completions/postinstall.sh
npm WARN package.json node#0.0.0 No repository field.
meteorite#0.6.13 /usr/local/share/npm/lib/node_modules/meteorite
├── colors#0.6.0-1
├── underscore#1.5.2
├── wrench#1.5.1
├── fstream#0.1.24 (inherits#2.0.1, graceful-fs#2.0.1, rimraf#2.2.2, mkdirp#0.3.5)
├── optimist#0.6.0 (wordwrap#0.0.2, minimist#0.0.5)
├── ddp#0.3.4 (meteor-ejson#0.6.3, ws#0.4.31)
└── prompt#0.2.11 (revalidator#0.1.5, pkginfo#0.3.0, read#1.0.5, utile#0.2.0, winston#0.6.2)
But when I type mrt,it shows
$ mrt
-bash: mrt: command not found
My node and nom version are :
$ node -v
v0.10.12
$ npm -v
1.2.32
Anyone help appreciated.
I just found the reason and solution: the mrt in ~/node_modules/meteorite/.bin/ should be included in /usr/local/bin or somewhere in your $PATH environment.So do this:
cp ~/node_modules/meteorite/.bin/mrt /usr/local/bin/
When I type mrt,it works:)
Related
I am trying to build docker file below through Jenkins.
FROM mcr.microsoft.com/dotnet/sdk:2.1 AS build
ARG PROFILE=Production
WORKDIR /app
COPY . ./
RUN cd src/stayfolio.Demo.Web.aroundfollie \
&& npm install && npm run build:dll && npm start
RUN dotnet restore stayfolio.Demo.Web.sln \
&& cd src/stayfolio.Demo.Web.aroundfollie \
&& mkdir -p build/outputs/aroundfollie \
&& dotnet publish --output ../../build/outputs/aroundfollie/
FROM mcr.microsoft.com/dotnet/sdk:2.1
WORKDIR /app
COPY --from=build /app/build/outputs/aroundfollie ./
CMD ["dotnet", "stayfolio.Demo.Web.aroundfollie.dll"]
However while building the file, it gives an error saying
step 5/10 : RUN cd src/stayfolio.Demo.Web.aroundfollie && npm install && npm run build:dll && npm start
---> Running in 86a2e1e8efcf
[91m/bin/sh: 1: npm: not found
[0mThe command '/bin/sh -c cd src/stayfolio.Demo.Web.aroundfollie && npm install && npm run build:dll && npm start' returned a non-zero code: 127
as you can see my docker file, I mentioned && npm install && npm run build:dll && npm start, but why the error saying npm: not found?
By default, the docker image mcr.microsoft.com/dotnet/sdk does not have npm installed. You can install it with the package manager or copy it from another docker image.
Example:
FROM node:alpine AS node_base
FROM mcr.microsoft.com/dotnet/sdk:2.1 AS build
COPY --from=node_base . .
# the rest of your Dockerfile
This approach is also described in the article you mentioned in your comment How to integrate 'npm install' into ASP.NET CORE 2.1 Docker build
I'm trying to flash on ATSAMA5D36 Xplained board using OpenOCD.
I builded and compiled application and want to debug using OpenOCD. When I am doing that I get the following error.
Openocd verson:
openocd-0.9.0.tar.gz
root#Harsha:/home/harsha/openocd_bin# openocd -f
interface/ftdi/ngxtech.cfg -f target/sama5d36.cfg Open On-Chip Debugger 0.10.0+dev-00556-gd0be163-dirty (2018-10-25-18:04) Licensed under GNU GPL v2
For bug reports, read http://openocd.org/doc/doxygen/bugs.html WARNING!
This file was not tested with real interface, but is assumed to work as this
interface uses the same layout as configs that were verified. Please report your
experience with this file to openocd-devel mailing list, so it could be marked
as working or fixed.
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
connect_deassert_srst
adapter speed: 1500 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
embedded:startup.tcl:21: Error: target requires -dap parameter instead of -chain-position!
in procedure 'script'
at file "embedded:startup.tcl", line 60
in procedure 'target' called at file "target/sama5d36.cfg", line 46
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21
Steps Followed:
$ sudo apt-get install build-essential
$ sudo apt-get install automake
$ sudo apt-get install autoconf
$ sudo apt-get install texinfo
Build:
$ cd openocd-r520/
$ ./bootstrap
$ ./configure --enable-ft2232_ftd2xx
$ make
$ sudo make install
I'm using a JTAG adapter based on the FT2232 chip, FTDI support library.
$ wget http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx0.20.0 .tar.gz
$ tar -zxf libftd2xx0.20.0tar.gz
$ sudo cp *.h /usr/local/include/
$ sudo cp libftd2xx.so.0.20.0 /usr/local/lib/
$ cd /usr/local/lib/
$ sudo ln -s libftd2xx.so.0.20.0 libftd2xx.so
$ sudo ln -s libftd2xx.so.0.20.0 libftd2xx.so.0
$ cd /usr/lib/
$ sudo ln -s /usr/local/lib/libftd2xx.so.0.20.0libftd2xx.so.0
$ sudo mount -a
-I am not able to figure out the issue, I only know this details. Any help will be appreciated.
Thanks in Advance
I wanted to have a Widget to view and edit the time range from within dashboards of kibana. So after lot of research i found a plugin as Kibana-time-plugin. Ref: https://github.com/nreese/kibana-time-plugin
Currently i am using kibana 5.4.0 in my local. After installing the plugin i have tried "bower install" as per the command specified in git page. But getting an error as :-
$ bower install
/usr/bin/env: ‘node’: No such file or directory
And even if Kibana is not running and giving an error as below attached image:-
kibana5.4.0
Can anyone Guide me on this ?
Thanks in Advance !!!!!!!!!!!!!!!
I think the optimization failures may be due to file permissions, the plugin files need to be accessible by the kibana user. Specifically check this instruction:
Installing plugins with linux packages
Here is a complete script that worked for me. I am new to Kibana and Kibana plugins so any feedback appreciated. Two important notes:
1) I am pulling the zip file from S3 so you will need to edit that.
2) Be sure to restart kibana afterwards and check the logs
#!/bin/bash
# install nodejs and npm
sudo curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
sudo yum install -y nodejs
sudo npm install -g bower
# copy the plugin zip and unzip it and fix the name
cd /usr/share/kibana/plugins
sudo aws s3 cp s3://<YOUR-BUCKET>/kibana-time-plugin-master.zip .
sudo unzip kibana-time-plugin-master.zip
sudo mv kibana-time-plugin-master kibana-time-plugin
# install the plugin
cd /usr/share/kibana/plugins/kibana-time-plugin
sudo sed -i -e 's/5.0.0/5.4.2/' package.json
sudo chown -R kibana:kibana *
sudo mkdir -p /home/kibana
sudo chown -R kibana:kibana /home/kibana
sudo -u kibana bower install
I am new to Docker and I am trying to simply launch an nginx app.
To do this, I have this DockerFile:
FROM debian:wheezy
MAINTAINER John Regan <john#jrjrtech.com>
RUN echo "deb http://nginx.org/packages/debian/ wheezy nginx" >> /etc/apt/sources.list.d/nginx.list
RUN apt-key adv --fetch-keys "http://nginx.org/keys/nginx_signing.key"
RUN apt-get update && apt-get -y dist-upgrade
RUN apt-get -y install nginx openssl ca-certificates
##Delete default repository
RUN rm -rf /etc/nginx/conf.d/*
RUN rm -rf /srv/www/*
ADD conf/nginx.conf /etc/nginx/nginx.conf
ADD conf/conf.d/default.conf /etc/nginx/conf.d/default.conf
ADD html/index.html /srv/www/index.html
VOLUME ["/etc/nginx"]
VOLUME ["/srv/www"]
EXPOSE 80
EXPOSE 443
ENTRYPOINT ["nginx"]
CMD []
My folder is organise like this:
├── conf
| ├── nginx.conf
| └── conf.d
| └── default.conf
├── html
| └── index.html
The command to launch the container:
sudo docker run -d -p 80:80 -v $pwd/conf:/etc/nginx -v $pwd/html:/srv/www my-nginx
But the conatiner stop and I got this message in the log:
nginx: [emerg] open() "/etc/nginx/mime.types" failed (2: No such file or directory) in /etc/nginx/nginx.conf:14
I know that the log is pretty clear, but I can't figure out why it doesn't work.
Thanks.
When you are mounting your conf dir your are replacing the contents of the /etc/nginx dir. instead mount the nginx.conf file and the conf/conf.d - see the section on mounting files, https://docs.docker.com/v1.8/userguide/dockervolumes/
sudo docker run -d -p 80:80 -v $pwd/conf/conf.d:/etc/nginx/conf.d -v $pwd/conf/nginx.conf:/etc/nginx/nginx.conf -v $pwd/html:/srv/www my-nginx
Are you sure the configuration on the in the nginx.conf is correct? The error seems related to nginx not to the docker.
The "volume" option, mount a new point of directory, you should've specifics if you need mount only a file.
I set up an angular development environment using the following Dockerfile (don't try to build this unless you're really enthusiastic, it takes an age).
FROM ubuntu:14.04
# build environment
RUN ["apt-get", "update"]
RUN ["apt-get", "install", "-y", "nodejs", "npm", "git"]
RUN ["ln", "-s", "/usr/bin/nodejs", "/usr/bin/node"]
RUN ["npm", "install", "-g", "yo"]
RUN ["npm", "install", "-g", "bower"]
RUN ["npm", "install", "-g", "grunt-cli"]
WORKDIR /home/angular
ADD ./package.json /home/angular/package.json
ADD ./bower.json /home/angular/bower.json
ADD ./dist /home/angular/dist
RUN ["npm", "install"]
RUN ["bower", "install", "--allow-root"]
# sass depedencies
ENV RUBY_MAJOR 2.2
ENV RUBY_VERSION 2.2.2
ENV RUBY_DOWNLOAD_SHA256 5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44
# some of ruby's build scripts are written in ruby
# we purge this later to make sure our final image uses what we just built
RUN ["apt-get", "install", "-y", "curl"]
RUN apt-get update \
&& apt-get install -y autoconf bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& rm -r /usr/src/ruby
# skip installing gem documentation
RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
ENV BUNDLER_VERSION 1.10.5
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
# don't create ".bundle" in all our apps
ENV BUNDLE_APP_CONFIG $GEM_HOME
RUN gem install compass
VOLUME ["/home/me/code/correspondence/client/dist"]
ADD ./ /home/angular
If I run this with:
sudo docker run -it me/angular /bin/bash
I can use grunt build with no problems. Since I haven't attached a volume to dist that build is no use to other containers such as the webserver. But running:
sudo docker run -itv /home/me/code/correspondence/client/dist:/home/angular me/angular /bin/bash
results in the grunt build command no longer being usable in the container:
grunt-cli: The grunt command line interface. (v0.1.13)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
The only difference is adding the volume. How does adding the volume result in this different behaviour?
I suppose that's because you have placed some files to /home/angular in image and when you're mounting your volume to the same path (/home/angular), your volume hides original files.
Quote from documentation:
Note: If the path /opt/webapp already exists inside the container’s
image, its contents will be replaced by the contents of /src/webapp on
the host to stay consistent with the expected behavior of mount
Try to mount volume to another directory, /home/angular/dist/client, for instance.