Giter Site home page Giter Site logo

Comments (4)

roland-reed avatar roland-reed commented on June 2, 2024

请先升级到最新版的 ykit 试试

from ykit.

18boys avatar 18boys commented on June 2, 2024

/Users/lishuai/bee/test/ykit.js:8
this.applymiddleware(proxy)
^

TypeError: this.applymiddleware is not a function
at Object.modifyWebpackConfig (/Users/lishuai/bee/test/ykit.js:8:12)
at Config.setCompiler (/Users/lishuai/.nvm/versions/node/v7.9.0/lib/node_modules/ykit/lib/models/Config.js:161:64)
at Project.handleExportsConfig (/Users/lishuai/.nvm/versions/node/v7.9.0/lib/node_modules/ykit/lib/models/Project.js:351:29)
at Project.readConfig (/Users/lishuai/.nvm/versions/node/v7.9.0/lib/node_modules/ykit/lib/models/Project.js:253:47)
at new Project (/Users/lishuai/.nvm/versions/node/v7.9.0/lib/node_modules/ykit/lib/models/Project.js:76:14)
at Object.exports.getProject (/Users/lishuai/.nvm/versions/node/v7.9.0/lib/node_modules/ykit/lib/modules/manager.js:93:29)
at Object.run (/Users/lishuai/.nvm/versions/node/v7.9.0/lib/node_modules/ykit/lib/cli.js:67:31)
at Object. (/Users/lishuai/.nvm/versions/node/v7.9.0/lib/node_modules/ykit/bin/ykit:8:5)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
➜ test ykit -v
[ykit] 0.8.3-beta.0

最新的也不行,最初我就在最新上尝试,然后有问题,还以为是新版本有问题,切到老版本也有此问题.
另外ykit的配置如下:
var proxy = require('bee-proxy')
var path = require('path');
module.exports = {
config: {
exports: ['./scripts/app.js'],
modifyWebpackConfig: function (baseConfig) {
// 示例:处理 .hello 类型文件,全部返回文字 "hello!"
this.applymiddleware(proxy)
return baseConfig;
}
}
};

几乎都是ykit init出来的工程,我就尝试加下中间件,然后就发现报错了.
请问你本地没有问题么,还是我电脑的环境问题?

from ykit.

18boys avatar 18boys commented on June 2, 2024

找到原因了,是你们官网的示例错了.https://ykit.ymfe.org/guide/advanced-guides.html
这个页面的this.applymiddleware 都应该写成 this.applyMiddleware. 官方文档中示例错误,真的是不走心呀.

from ykit.

honchy avatar honchy commented on June 2, 2024

感谢反馈。

from ykit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.