PATH npm 中的空格

Spaces in PATH npm(PATH npm 中的空格)
本文介绍了PATH npm 中的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

所以我一直在尝试安装 gulp 并且不断收到:

So I've been trying to install gulp and I keep getting:

module.js:471^throw err : 找不到模块 'C:cUsersJoe's Steezy笔记本电脑AppDataRoaming pm ode_modulesgulp-cliingulp.js'

module.js:471^throw err : cannot find module 'C:cUsersJoe's Steezy LaptopAppDataRoaming pm ode_modulesgulp-cliingulp.js'

如您所见,我的 username 中有空格,我读到 npm 无法读取有空格的路径.我的问题是我该如何解决这个问题?我知道有执行符号链接的选项,并且有一个选项可以创建一个全新的用户并确保用户名文件夹这次没有任何空格.

As you can see my username has spaces in it and I read that npm cant read paths that have spaces. my question is how do i fix this? I know theres the option to do symbolic links, and there is an option to make a whole new user and make sure the username folder doesn't have any spaces in it this time.

还有其他方法可以做到这一点吗?我对自己没有足够的信心来做一个 symbolic link 因为我读到如果你把它搞砸了,它真的会搞砸你的系统.我也不想在我的笔记本电脑上创建一个全新的用户,因为那样我就必须重新安装我所有的程序,这太糟糕了.如果有人可以提供帮助,将不胜感激!

Is there another way I can do this? I don't trust myself enough to do a symbolic link because i read that it can really mess up your system if you mess it up. I also don't really want to make a whole new user on my laptop because then i have to install all my programs all over again which kind of sucks. Please if anyone can help, it would be much appreciated!

推荐答案

这适用于 windows.您可以在环境变量中使用短路径名,例如使用 "C:PROGRA~1 odejs" 而不是 "C:Progam Files odejs".

This works for windows. You can use the short path name in the environment variable, e.g. use "C:PROGRA~1 odejs" instead of "C:Progam Files odejs".

您可以通过在父文件夹中执行 dir/x 找到正确的文件夹短名称.

You can find out the correct short name of your folder by executing dir /x in the parent folder.

这篇关于PATH npm 中的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
Ordinals in words javascript(javascript中的序数)
getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)