Coffeescript Wintersmith:加载插件时出错'/节点模块/wintersmith coffee/&x27;:找不到模块'/插件';

Coffeescript Wintersmith:加载插件时出错'/节点模块/wintersmith coffee/&x27;:找不到模块'/插件';,coffeescript,wintersmith,Coffeescript,Wintersmith,2013年11月,我与温特史密斯建立了一个网站。现场直播 我要回到它,但它不是建筑:-{ 我不介意弄脏我的手,但我不知道从哪里开始。我得到了这个错误: error Error loading plugin './node_modules/wintersmith-coffee/': Cannot find module './plugin' 有什么建议吗 谢谢 迈克 更新 嘿,这是因为咖啡脚本没有被编译 我在全球范围内安装了它,但这没有帮助 $ sudo npm install -g coffe

2013年11月,我与温特史密斯建立了一个网站。现场直播

我要回到它,但它不是建筑:-{

我不介意弄脏我的手,但我不知道从哪里开始。我得到了这个错误:

error Error loading plugin './node_modules/wintersmith-coffee/': Cannot find module './plugin'
有什么建议吗

谢谢

迈克

更新 嘿,这是因为咖啡脚本没有被编译

我在全球范围内安装了它,但这没有帮助

$ 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"
  }
}
这是我正在使用的一台新的dev笔记本电脑,所以这可能是问题的一部分

我解决了这个问题,但没有解决。我真的需要手动编译咖啡脚本吗


谢谢!

节点模块中似乎缺少wintersmith coffee;请确保使用
npm install wintersmith coffee
在本地安装了它。如果您没有在任何地方使用它,也可以尝试将其从
config.json
中删除

查看您的
config.json
package.json
也会很有帮助。另外,请确保运行
npm安装
npm更新
,以确保安装并更新了
package.json
中引用的所有内容

更新


未安装CoffeeScript可能是问题所在。全局安装CoffeeScript后,我不确定是否所有的shell会话都会在不重新启动的情况下使用该命令。使用新的shell会话,查看是否可以构建站点。您也可以尝试在站点隔离的情况下测试Wintersmith。尝试生成示例站点使用
wintersmith new somepath
并查看是否可以在那里运行
wintersmith build
。这将是缩小站点和工作站设置之间问题的良好开端。

我通过在
config.json
文件中显式指定plugin.coffee解决了这个问题

{
…其他东西。。。
“插件”:
[“/node_modules/wintersmith coffee/plugin.coffee”
,“/node_模块/wintersmith手写笔/plugin.coffee”
],
…更多的东西。。。

}

嘿,我更新了这个问题。是的,这是一个coffeescript问题。顺便说一句,谢谢你的帮助!嗨,wintersmith build在新版本中工作,但不是旧版本。不确定区别是什么,但你是对的,这是一个开始。好吧,我可能误解了这个问题。在你在问题中显示的config.json中,它不一样。我id与您一开始的操作完全相同,但我需要更加具体,并将“..../plugin.coffee”文件显式添加到路径中以使其正常工作。如果这是您实际执行的操作,则您应该更新您的问题。是的!这就成功了。我的眼睛看到了,但我的大脑没有看到。感谢您的后续操作!