I run this command on AppVeyor:
dotnet publish .\src\ReviewerServices.web -c Release
ReviewerServices.web is the folder containing my .NET MVC app and I want to create all the files to publish on IIS
Unfortunately, what I get is:
locally I get the same error. Do I need to install bower? npm install -g bower?
Ok, I had to install bower and gulp
npm install -g bower
npm install -g gulp
I have solved the problem.
need to install bower and gulp as a global packages.
npm install -g bower
npm install -g gulp
Related
I'm trying to install a specific version of npm package within the node:alpine image (latest tag), so this is what I specified in my Dockerfile:
Edit (this is the full Dockerfile):
FROM node:alpine as build-stage
ARG SONAR_VERSION=4.6.0.2311
RUN apk add --no-cache zip unzip
RUN wget -c https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_VERSION-linux.zip
RUN unzip -q sonar-scanner-cli-$SONAR_VERSION-linux.zip
RUN rm sonar-scanner-cli-$SONAR_VERSION-linux.zip
# Adding the $install_directory/bin directory to path
RUN cd sonar-scanner-$SONAR_VERSION-linux
RUN echo $PWD
RUN export PATH="$PATH:/$PWD/bin"
RUN npm i -g eslint#6.7.2
RUN npm i -g eslint-plugin-vue --save-dev
However when I run & execute the built image, the installed version of eslint is the latest instead of what I'd specified in the Dockerfile.
Result from npm list -g:
/ # npm list -g
/usr/local/lib
+-- eslint-plugin-vue#7.9.0
+-- eslint#7.25.0
`-- npm#7.11.2
If I run npm i -g eslint#6.7.2 within the container itself, the version from npm list -g will be exactly the one I specified.
What is the reason of this scenario?
I am working on an existing project that was built by Droopler distribution and docker4drupal. As per Droopler distribution documentation, it requires npm and gulp to compiled sass easily and docker4drupal don't have it by default.
I tried to install in the container by sudo apt-get install npm and it says:
sudo: apt-get: command not found
Is there any way to install npm and gulp in docker4drupal for my existing project?
I am able to install npm & gulp, access php container and install those.
access php container docker-compose exec php bash
install npm sudo apk update && sudo apk add npm
install gulp globally sudo npm install -g gulp
This is how I do it, maybe there is a better way.
Reference: Install npm and gulp
I use nvm and I have McAfee with Windows 10 (so my C:\Users\User\AppData\Roaming\nvm\v8.9.2\node_modules\npm\node_modules is empty at the beginning, so I copy/paste manualy all node_modules (with bower and bower-config) inside.
I use this:
npm install bower -g
And
npm bower --version
5.5.1
but
bower --version
bash: bower: command not found
EDIT:
npm bower --version 5.5.1 is not bower verion but npm version!!
On windows 10 + NVM
npm config set prefix /c/Users/xxxxxxx/AppData/Roaming/nvm/v8.9.2
npm install -g bower
bower --version
1.8.8
I have all this npm stuff in my Dockerfile and it is taking a long time to build my docker image. How can I speed this up, and ideally cache the results? Nothing is changing, so I wouldn't expect this to take such a long time (about 20 seconds now).
FROM python:3.6-alpine
# python stuff
COPY requirements.txt /app/requirements.txt
RUN pip3 install --upgrade pip
RUN pip3 install -r /app/requirements.txt
# npm stuff
RUN apk add --update nodejs-npm
RUN npm init -y
RUN npm i webpack webpack-cli --save-dev
RUN npm i #babel/core babel-loader #babel/preset-env #babel/preset-react babel-plugin-transform-class-properties --save-dev
RUN npm i react react-dom prop-types --save
RUN npm i react-bootstrap bootstrap
RUN npm i weak-key --save
I did try this solution using the COPY package.json but babel and webpack did not seem to like that (and it did not work).
NOTE: I need to use python:3.6-alpine as this is an existing Django application that is integrating React.js
Is there any way to install Bower Offilne?
I'm trying to install bower but the same is probably being blocked by some proxy, I would need to install offline
I am using the command:
npm install -g bower on cmd and git cmd.
node.js and npm is instaled.
You can download the Bower zip file and install it as described here.