小编Mar*_*zes的帖子

NODE 8.0.0和NPM 4.2.0 ERROR快速加载require.extensions.hasOwnProperty不是函数

我正在Node 8.0.0和NPM 5.0.0中创建一个应用程序,当我使用快速加载时,var load = require("express-load");我的服务器返回:

load/lib/express-load.js:32

  if (require.extensions.hasOwnProperty(ext) && extlist.indexOf(ext) === -1) {
                         ^

TypeError: require.extensions.hasOwnProperty is not a function
    at Object.<anonymous> (/Users/node_modules/express-load/lib/express-load.js:32:26)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/node_modules/express-load/index.js:8:18)
    at Module._compile (module.js:569:30)
Run Code Online (Sandbox Code Playgroud)

我尝试降级到npm sudo npm install -g npm@4.2.0版本4.2.0(https://github.com/tjunnone/npm-check-updates/issues/355)并且不起作用

这篇文章npm检查更新对我有用.

谢谢!!!!

node.js npm

9
推荐指数
4
解决办法
7221
查看次数

Swift-如何从UITableViewCell中的按钮调用UIVIewController

我有一个UITableViewCell(.xib),在此单元格中有一个按钮,当按下按钮时,我想打开一个UIViewController

在此处输入图片说明

图标是我的按钮

在我的TableViewController

class DetalhaConsultaServidorViewController: UITableViewController {

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
...

    let cell = Bundle.main.loadNibNamed("HistoricoClienteServidorTableViewCell", owner: self, options: nil)?.first as! HistoricoClienteServidorTableViewCell

...
    return cell
}
Run Code Online (Sandbox Code Playgroud)

和我的CustomCell班级:

class HistoricoClienteServidorTableViewCell: UITableViewCell {

    @IBAction func actionButton(_ sender: Any) {

        //how open a UIViewController (xib or main.storyboard)?
    }
    ...
Run Code Online (Sandbox Code Playgroud)

如何打开UIViewController(xib或main.storyboard)?

谢谢!

uitableview uiviewcontroller ios swift

0
推荐指数
1
解决办法
1694
查看次数

标签 统计

ios ×1

node.js ×1

npm ×1

swift ×1

uitableview ×1

uiviewcontroller ×1