如何在自制软件中安装特定版本的公式?例如,postgresql-8.4.4而不是最新的9.0.
我围绕我的项目创建了一个virtualenv,但是当我尝试激活它时我不能.它可能只是语法或文件夹位置,但我现在很难过.
你可以在下面看到,我创建了virtualenv并称之为venv.一切看起来都不错,然后我尝试通过运行来激活它source venv/bin/activate
我想它可能只与我的系统路径有关,但不知道该指向什么(我知道如何编辑路径).我在python 7/windows os,虚拟环境2.2.x
Processing dependencies for virtualenv Finished processing dependencies for virtualenv c:\testdjangoproj\mysite>virtualenv --no-site-packages venv The --no-site-packages flag is deprecated; it is now the default behavior. Using real prefix 'C:\\Program Files (x86)\\Python' New python executable in venv\Scripts\python.exe File venv\Lib\distutils\distutils.cfg exists with different content; not overwri ting Installing setuptools.................done. Installing pip...................done. c:\testdjangoproj\mysite>source venv/bin/activate 'source' is not recognized as an internal or external command, operable program or batch file. c:\testdjangoproj\mysite>source venv/bin/activate 'source' is not recognized …
我有一个简单的对象,如下所示:
var countries = {
"Argentina":1,
"Canada":2,
"Egypt":1,
};
Run Code Online (Sandbox Code Playgroud)
我需要创建两个数组.第一个数组是来自对象的所有键的数组.我创建了这个数组:
var labels = Object.keys(countries);
Run Code Online (Sandbox Code Playgroud)
这很好用.我获得了一系列国家.现在当我尝试从值创建数组时...
var labels = Object.values(countries);
Run Code Online (Sandbox Code Playgroud)
我收到此错误: Uncaught TypeError: Object.values is not a function JavaScript
我不知道我做错了什么.我console.log countries在声明之前labels和之后的console.log 并且对象保持不变.我该如何正确使用Object.values()?
我正在尝试降级我的节点版本
我跑了:
npm install nvm
Run Code Online (Sandbox Code Playgroud)
我将bin文件夹导出到我的Windows路径变量,
C:\Program Files (x86)\nodejs\node_modules\npm\bin
Run Code Online (Sandbox Code Playgroud)
但我仍然得到:
'nvm'不被识别为内部或外部命令.
我应该在路径变量中添加另一条路径吗?
我正在编写一个应用程序,其中包含大约12个简短的JS文件<head>(我知道,我应该合并它们并在结束之前移动它们<body>;在生产时会得到它们)
麻烦的是,当我尝试在Chrome中加载应用程序时,有些文件立即加载,而有些文件从未完成加载!Chrome一直试图加载12个JS文件,并且在我点击"停止"之前从不渲染页面.
当我点击停止时,呈现HTML并且JS文件失败,如下图所示:

请注意,每次尝试都会失败不同的JS文件!它不是每次都被卡住的同一个文件!
检查失败文件的标题显示"警告:请求尚未完成".文件卡在"接收"有时很长一段时间!

现在这里是有趣的部分,在点击停止后,如果我专注于omnibar并按回车键,所有JS文件立即加载,应用程序正常工作!
在服务器端,我使用的是Apache,PHP和MySQL.我在Apache中错误配置了什么吗?
在两天艰苦的日子之后的状态:zilch,没什么,nada,这让我疯了.我尝试从不同的机器运行代码,尝试更改apache缓存设置并在javascript中更改了无数的东西,但没有任何工作.最糟糕的是没有人可以指出问题出在哪里!
我在执行时遇到以下错误npm install:
$ npm install
npm ERR! code 127
npm ERR! path /home/jesusjimenez/projects/project/node_modules/fibers
npm ERR! command failed
npm ERR! command sh -c node build.js || nodejs build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.12.0 | linux | x64
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用npm install命令安装所有依赖项,但是在安装它时出现如下错误:
ling source file ..\src\threaded_callback_invokation.cc)
c:\applatest\applatest\node_modules\nan\nan.h(1478): warning C4996: 'node::MakeCallback': was declared deprecated (comp
iling source file ..\src\threaded_callback_invokation.cc) [C:\appLatest\appLatest\node_modules\voicemeeter\node_modules
\ffi\build\ffi_bindings.vcxproj]
c:\users\alliancetek\.node-gyp\10.15.0\include\node\node.h(176): note: see declaration of 'node::MakeCallback' (compi
ling source file ..\src\threaded_callback_invokation.cc)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" …Run Code Online (Sandbox Code Playgroud) 当我使用以下命令启动本地Firebase服务器时收到此消息firebase serve:
警告:您使用的是Node.js v8.9.4,但Google Cloud Functions仅支持v6.11.5.
但是没有关于该怎么做的信息.将Node.js降级到v6.11.5需要做什么?我是应该仅为Firebase项目使用该版本,还是为其他项目使用最新发布的Node.js版本?在那种情况下我该怎么做?
编辑:警告现在看起来像这样,我无法运行一个新的几乎空的项目:
Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
! functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory.
! functions: Error from emulator. mod.hasOwnProperty is not a function
Run Code Online (Sandbox Code Playgroud)
所以我真的认为我必须降级Node.js. 但我不知道如何安全地做到这一点.嗯,看着http://nodejs.org/我甚至找不到版本v6.11.5?
编辑2:如果npm update --dev修复了问题,只需检查新项目.它没.(实际上没有更新的包.)
我用这个工具安装了一些Node.js版本n.我使用以下方法卸载了所有Node.js版本:
sudo n prune
Run Code Online (Sandbox Code Playgroud)
除了当前(激活)版本.如果我尝试卸载当前版本:
sudo n rm 6.10.2
我收到以下错误:
Error: cannot remove currently active version (node/6.10.2).
我无法弄清楚,如何设置系统(Arch Linux)默认的Node.js版本,它已经安装并用于安装n.
如果卸载n使用:
sudo npm uninstall -g n
Run Code Online (Sandbox Code Playgroud)
它将当前版本留在我的计算机上.
ls /usr/local/n/versions/node/
6.10.2/
Run Code Online (Sandbox Code Playgroud)
我是否需要手动删除该文件夹:/usr/local/n/?或者,是否有一个选项n可以卸载它和安装的所有Node.js版本n,以便在安装之前获取设置n?
调试节点会话并在调试器中停止时,"变量"视图显示"收集数据..."但数据永远不会到达:

节点版本0.10.34和节点的0.10.35会发生这种情况.
关于此问题,有一些较旧的帖子,但是从2013年和2014年提出的问题来看,那里的答案对我的情况没有帮助。
我将debugger关键字放置在文件中的多个位置,甚至在检查器UI中添加了手动断点。尽管如此,执行文件不会在任何断点处停止。我正在使用节点9.2.0和chrome 64.0.3282.167。
我想用npm 安装这个有角度的2日历.试图使用npm安装它,然后下载并尝试安装它.在这两种情况下都失败了.
我在Windows上,我之前尝试安装angular2 CLI时遇到此错误.现在我得到了这个包的相同错误,我不知道如何纠正它.我试图取消CLI,然后清除缓存,但没有用.
有人可以查看错误,让我知道我需要采取哪些步骤来纠正这个问题.
cmd上显示的错误如下:
C:\Users\simon\SPA\ANGULAR2 CALENDAR EXAMPLE>npm install
> node-zopfli@1.4.0 install C:\Users\simon\node_modules\node-zopfli
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download: https://node-zopfli.s3.amazonaws.com/Release/zopfli-v1.4.0-node-v48-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for node-zopfli@1.4.0 and node@6.6.0 (node-v48 ABI) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error
MSB8036: The Windows SDK version 8.1 was not found. Install the required …Run Code Online (Sandbox Code Playgroud) node.js ×8
npm ×5
javascript ×2
npm-install ×2
angular ×1
apache ×1
archlinux ×1
arrays ×1
firebase ×1
firebase-cli ×1
homebrew ×1
html ×1
installation ×1
n ×1
node-gyp ×1
node-modules ×1
nvm ×1
object ×1
php ×1
pycharm ×1
python ×1
versioning ×1
virtualenv ×1