Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

NPM Install Error When a Parent Directory of the Repo Has a Space in Its Name #15

Open
gwholland3 opened this issue Mar 1, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@gwholland3
Copy link

Here is a complete stacktrace of the error:

> [email protected] init
> npm install && run-script-os

npm ERR! code 1
npm ERR! path /Users/grantholland/Grant/Cal Poly/Clubs/CSAI/Repos/argo-editor/node_modules/deasync
npm ERR! command failed
npm ERR! command sh -c node ./build.js
npm ERR! CXX(target) Release/obj.target/deasync/src/deasync.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info find Python using Python version 3.8.7 found at "/Users/grantholland/.pyenv/versions/argo_venv/bin/python3"
npm ERR! gyp info spawn /Users/grantholland/.pyenv/versions/argo_venv/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/grantholland/Grant/Cal Poly/Clubs/CSAI/Repos/argo-editor/node_modules/deasync/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/grantholland/Library/Caches/node-gyp/15.10.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/grantholland/Library/Caches/node-gyp/15.10.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/grantholland/Library/Caches/node-gyp/15.10.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/grantholland/Grant/Cal Poly/Clubs/CSAI/Repos/argo-editor/node_modules/deasync',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! clang: error: no such file or directory: 'Poly/Clubs/CSAI/Repos/argo-editor/node_modules/node-addon-api'
npm ERR! make: *** [Release/obj.target/deasync/src/deasync.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:378:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 19.6.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/15.10.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/grantholland/Grant/Cal Poly/Clubs/CSAI/Repos/argo-editor/node_modules/deasync
npm ERR! gyp ERR! node -v v15.10.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok 
npm ERR! Build failed

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/grantholland/.npm/_logs/2021-03-01T05_25_13_147Z-debug.log
npm ERR! code 1
npm ERR! path /Users/grantholland/Grant/Cal Poly/Clubs/CSAI/Repos/argo-editor
npm ERR! command failed
npm ERR! command sh -c npm install && run-script-os

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/grantholland/.npm/_logs/2021-03-01T05_25_13_295Z-debug.log

As you can see in this snippet of the error: npm ERR! clang: error: no such file or directory: 'Poly/Clubs/CSAI/Repos/argo-editor/node_modules/node-addon-api' it appears to be trying to reference node-addon-api but has cut out all of the absolute filepath before the Poly in my Cal Poly folder.

Here is the entire filepath for reference, from another error snippet: npm ERR! path /Users/grantholland/Grant/Cal Poly/Clubs/CSAI/Repos/argo-editor/node_modules/deasync

If I rename that directory to CalPoly, the npm run install or npm run init works.

Not sure if this error is coming from something we wrote or from a tool we're using...

@gwholland3 gwholland3 added the bug Something isn't working label Mar 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants