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

Package does not build if folder name contains spaces #126

Open
amacar opened this issue Dec 8, 2020 · 0 comments
Open

Package does not build if folder name contains spaces #126

amacar opened this issue Dec 8, 2020 · 0 comments

Comments

@amacar
Copy link

amacar commented Dec 8, 2020

I check out a project into a folder that has a space in the folder name. Building process is interrupted with an error:

yarn install v1.22.5
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error /home/ama/Namizje/hi hi/node_modules/nsfw: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /home/ama/Namizje/hi hi/node_modules/nsfw
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@12.17.0 | linux | x64
gyp info find Python using Python version 2.7.18 found at "/usr/bin/python2"
gyp info spawn /usr/bin/python2
gyp info spawn args [
gyp info spawn args   '/home/ama/.nvm/versions/node/v12.17.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ama/Namizje/hi hi/node_modules/nsfw/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ama/.nvm/versions/node/v12.17.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/ama/.cache/node-gyp/12.17.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/ama/.cache/node-gyp/12.17.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/ama/.nvm/versions/node/v12.17.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/ama/.cache/node-gyp/12.17.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/ama/Namizje/hi hi/node_modules/nsfw',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/ama/Namizje/hi hi/node_modules/nsfw/build'
  CXX(target) Release/obj.target/nsfw/src/NSFW.o
g++: error: hi/node_modules/node-addon-api: Datoteka ali imenik s tem imenom ne obstaja
make: *** [nsfw.target.mk:126: Release/obj.target/nsfw/src/NSFW.o] Error 1
make: Leaving directory '/home/ama/Namizje/hi hi/node_modules/nsfw/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/ama/.nvm/versions/node/v12.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-54-generic
gyp ERR! command "/home/ama/.nvm/versions/node/v12.17.0/bin/node" "/home/ama/.nvm/versions/node/v12.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ama/Namizje/hi hi/node_modules/nsfw
gyp ERR! node -v v12.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

then I move the project into a folder without spaces in a name and building went through without a problem.

I used minimal package.json

{
   "name":"hihi",
   "version":"1.0.0",
   "main":"index.js",
   "license":"MIT",
   "dependencies":{
      "nsfw":"2.1.0"
   }
}
@amacar amacar changed the title Package does not build if in folder with spaces Package does not build if folder name contains spaces Dec 8, 2020
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

1 participant