Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Install fails when npm installing in folder name that contains a space #19

Open
smithb1994 opened this issue Mar 15, 2023 · 2 comments

Comments

@smithb1994
Copy link

@FeelyChau
As the title says, error occurs when npm installing in a folder name that contains a space.

Here's the error leading up to it when folder name is test 1:

npm ERR! code 1
npm ERR! path /home/anon/Desktop/test 1/node_modules/@pipcook/boa
npm ERR! command failed
npm ERR! command sh -c /tmp/preinstall678932627.sh
npm ERR! sh "command -v rm"
npm ERR! /bin/rm
npm ERR! sh "command -v make"
npm ERR! /usr/bin/make
npm ERR! sh "command -v tar"
npm ERR! /bin/tar
npm ERR! sh "command -v wget"
npm ERR! /usr/bin/wget
npm ERR! make: Entering directory '/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11'
npm ERR! rm -rf "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/src"
npm ERR! mkdir -p "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads"
npm ERR! [ -f "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-v2.4.3.tgz" ] || wget -O "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-v2.4.3.tgz" https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz
npm ERR! md5sum --quiet --check checksums
npm ERR! tar -C "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads" -xf "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-v2.4.3.tgz"
npm ERR! mv "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-2.4.3" "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/src"
npm ERR! # apply patches
npm ERR! patch -u -b src/include/pybind11/pytypes.h -i patches/2.4.3-fix-object-destruct.patch
npm ERR! patching file src/include/pybind11/pytypes.h
npm ERR! rm -rf "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/src"
npm ERR! mkdir -p "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads"
npm ERR! [ -f "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-v2.4.3.tgz" ] || wget -O "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-v2.4.3.tgz" https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz
npm ERR! md5sum --quiet --check checksums
npm ERR! tar -C "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads" -xf "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-v2.4.3.tgz"
npm ERR! mv "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/downloads/pybind11-2.4.3" "/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11/src"
npm ERR! # apply patches
npm ERR! patch -u -b src/include/pybind11/pytypes.h -i patches/2.4.3-fix-object-destruct.patch
npm ERR! patching file src/include/pybind11/pytypes.h
npm ERR! make: Leaving directory '/home/anon/Desktop/test 1/node_modules/@pipcook/boa/pybind11'
npm ERR! sh "curl https://repo.anaconda.com/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh > Miniconda3-4.7.12.1-Linux-x86_64.sh"
npm ERR! sh "rm -rf /home/anon/Desktop/test 1/node_modules/@pipcook/boa/.miniconda"
npm ERR! sh "sh ./Miniconda3-4.7.12.1-Linux-x86_64.sh -f -b -p /home/anon/Desktop/test 1/node_modules/@pipcook/boa/.miniconda"
npm ERR! ERROR: did not recognize option '1/node_modules/@pipcook/boa/.miniconda', please try -h
@smithb1994
Copy link
Author

@yorkie @FeelyChau @NHibiki @steveoni
This is a breaking bug. Is this repo still maintained?

@yorkie
Copy link
Member

yorkie commented Mar 17, 2023

See what I have commented here: alibaba/pipcook#958 (comment):

Boa depends on the Miniconda3-4.7.12.1 which doesn't support installing on a folder with spaces

I tried to fix the install scripting issue in Boa itself yesterday, but found out that finally miniconda also doesn't support installation directories with spaces, so possible solutions are as follows:

  1. Upgrade the Miniconda to higher version which supports folder with spaces
  2. Remove the spaces from your directory

Because the first solution involves the upgrade of dependencies, it will take a long time for us to upgrade and release, so I looked at your installation directory(/home/anon/Desktop/test 1/node_modules). As for your problem, the easiest way is to modify your directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants