2013年11月,我和温特史密斯建立了一个网站。在http://powma.com现场直播
我要回去了,但它不是在建造
我不介意弄脏我的手,但我不知道从哪里开始。我得到了一个错误:
error Error loading plugin './node_modules/wintersmith-coffee/': Cannot find module './plugin'有什么建议吗?
谢谢!
麦克
更新
嘿,这是因为coffeescript没有被编译。
我在全球范围内安装了它,但这没有帮助。
$ sudo npm install -g coffee-script我手动编译了它,并移到其他错误。有什么建议吗?
$ coffee -c plugin.coffee 这是我的config.json:
{
"locals":
{ "url": "http://localhost:8080"
, "title": "Powma"
, "subTitle": "Linking you to technology"
, "motto": "We build exceptions sites and applications to connect people to products, services, and each other."
, "owner": "Michael Cole"
, "profilePicture": "/static/img/profile-professional.jpg"
, "inlineSpriteMaxBytes" : 10000
},
"views": "./views",
"plugins":
[ "./node_modules/wintersmith-coffee/"
, "./node_modules/wintersmith-stylus/"
],
"require": {
"moment": "moment",
"_": "underscore",
"typogr": "typogr"
},
"jade": {
"pretty": true
},
"markdown": {
"smartLists": true,
"smartypants": true
},
"paginator": {
"perPage": 3
}
}和package.json:
{
"name": "Powma-com",
"version": "0.1.1",
"private": true,
"engines": {
"node": "0.10.17"
},
"dependencies": {
"moment": "2.0.x",
"underscore": "1.5.x",
"typogr": "0.5.x",
"wintersmith": "2.0.x",
"wintersmith-stylus": "git://github.com/MichaelJCole/wintersmith-stylus.git#master",
"wintersmith-coffee": "0.2.x",
"express": "3.4.x",
"sendgrid": "~0.3.0-rc.1.7",
"express-validator": "~0.8.0",
"underscore-express": "0.0.4"
}
}这是我正在使用的一款新的开发笔记本电脑,所以这可能是问题的一部分。
我解决了这个问题,但没有解决。我真的需要手动编译coffeescript吗?
谢谢!
发布于 2014-04-02 21:02:51
我通过在plugin.coffee文件中显式指定config.json来解决这个问题。
{ ...other stuff... "plugins": [ "./node_modules/wintersmith-coffee/plugin.coffee" , "./node_modules/wintersmith-stylus/plugin.coffee" ], ...more stuff... }
发布于 2014-02-24 10:15:29
看起来你缺少了node_modules中的温特史密斯咖啡;确保它与npm install wintersmith-coffee一起安装在本地。如果您不在任何地方使用它,也可以尝试从config.json中删除它。
同时看到您的config.json和package.json也很有帮助。还要确保运行npm install和npm update,以确保安装和更新了package.json中引用的所有内容。
更新
没有安装CoffeeScript可能是问题所在。在全局安装之后,我不确定您的所有shell会话是否都会在未重新启动的情况下获得并使用该命令。使用新的shell会话,查看是否可以构建站点。您也可以尝试测试与您的网站隔离的温特史密斯。尝试用wintersmith new somepath生成一个示例站点,看看是否可以在那里运行wintersmith build。这将是缩小站点和工作站设置之间问题的良好开端。
https://stackoverflow.com/questions/21970252
复制相似问题