呵呵!阿格夫"/usr/bin/node" "/usr/bin/npm" "install" "-y" "--no-install-recommends" "--global" "mathjax-no



早上好,我试图安装以下存储库:https://github.com/AntoineMeler/Paraglidable我只是运行了以下命令:

docker build -t paraglidable Paraglidable/docker/.

我得到以下错误:

npm ERR! Linux 5.4.0-97-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-y" "--no-install-recommends" "--global" "mathjax-node-cli"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>
npm WARN deprecated mathjax-node-sre@3.0.3: This package has been archived. MathJax v3 provides equivalent functionality.
npm ERR! Please include the following file with any support request:
npm ERR!     /npm-debug.log

我在网上搜索了以下问题,我相信这是由mathjax模块的不推荐版本引起的,但我不明白如何纠正这个问题。

Docker正在ubuntu服务器20.04上运行。

你能帮帮我吗?非常感谢!

该错误似乎与安装包mathjax-node-cli时使用的npm版本有关。

安装新版本的node.js将解决这个问题,因为它还将升级npm版本。

我已经按如下方式编辑了Dockerfile,现在它似乎正在工作。

FROM tensorflow/tensorflow:latest-py3
ARG USERNAME=paraglidable
RUN useradd -m $USERNAME
ENV HOME /home/$USERNAME
ENV DEBIAN_FRONTEND=noninteractive
## Added the line below for installing node.js version 12 instead of 8.
RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
## Also removed `npm` from here since it is already included in `nodejs` package
RUN apt-get -y update && apt-get install -y --no-install-recommends net-tools libopenjp2-7-dev libpng-dev libpng16-16 vim sass wget qt5-default pdf2svg apache2 php libapache2-mod-php nodejs ibgeos-3.6.2 libgeos-dev unzip
# grib
RUN apt-get -y update && apt-get install -y --no-install-recommends libgrib-api-dev libgrib-api0
RUN apt-get -y update && apt-get install -y --no-install-recommends libeccodes-dev libeccodes0
# tex2svg
RUN npm install -y --no-install-recommends --global mathjax-node-cli
# Add sudo support
RUN apt-get install -y sudo 
&& echo $USERNAME ALL=(root) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && 
chmod 0440 /etc/sudoers.d/$USERNAME

USER $USERNAME
RUN sudo pip install glob3 tqdm colorama requests pandas matplotlib pillow numba pyproj jupyter
RUN sudo pip install pygrib
RUN sudo pip install https://github.com/matplotlib/basemap/archive/master.zip

最新更新