小编ode*_*nsc的帖子

安装http服务器时出错:找不到ecstatic@^3.0.0的匹配版本

我是前端开发的新手,现在我必须维护AngularJS应用程序。我正在尝试安装http-server以测试我的应用程序,但是当我运行npm install http-server -g命令时,出现以下错误:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for ecstatic@^3.0.0
npm ERR! notarget In most cases you ir one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'http-server'
npm ERR! notarget
Run Code Online (Sandbox Code Playgroud)

我还没有找到任何解决方案。你们以前看过这个错误吗?

node.js npm

14
推荐指数
2
解决办法
2751
查看次数

如何 console.log 数组中的每个元素?

我在解决与 forEach 方法相关的问题时遇到了麻烦。我已经尝试了所有我能想到的编写这段代码的方法,但问题一每次仍然是错误的。

function exerciseOne(names){

// Exercise One: In this exercise you will be given and array called names. 

// Using the forEach method and a callback as it's only argument, console log

// each of the names.
}


// MY CODE: 

function logNames(name){

  console.log(name);
}

 names.forEach(logNames);
Run Code Online (Sandbox Code Playgroud)

javascript arrays

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

arrays ×1

javascript ×1

node.js ×1

npm ×1