使用约曼的发电机角fullstack代后失踪模块 [英] Missing modules after generation using Yeoman's generator-angular-fullstack

查看:232
本文介绍了使用约曼的发电机角fullstack代后失踪模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有几乎相同的标题矿用没有答案<一个问题href=\"http://stackoverflow.com/questions/35105628/missing-modules-after-fresh-generation-with-yeomans-angular-fullstack\">here,我不能发表评论,看看@加布里埃尔 - 库克尔用它在任何地方得到。我要发布一个答案,但我看到的StackOverflow说,为了避免这样做,所以问同样的问题是最好的,我可以认为做...

There's a question with almost the same title as mine with no answers here, and I can't comment to see if @Gabriel-Kunkel got anywhere with it. I was going to post an answer, but I saw StackOverflow said to avoid doing that, so asking the same question was the best I could think to do...

我想取得一个新的从发电机角fullstack这些选项

I'm trying to get a fresh install from the generator-angular-fullstack with these options


  1. 步兵

  2. 茉莉花

  3. 打字稿

  4. HTML

  5. LESS

  6. UI路由器

  7. 引导

  8. UI-引导

  9. 蒙戈

  10. 验证样板(是)

  11. 没有其他的OAuth策略

  12. Socket.io(是)

发电机,更改/添加任何东西之前,加载一个空白的屏幕,这些错误拿着它在Chrome控制台:

The generator, before changing/adding anything, loads a blank screen with these error holding it up in the Chrome console:

Uncaught Error: [$injector:nomod] Module 'intranetApp.auth' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

和也与intranetApp.admin同样的事情

And also the same thing with 'intranetApp.admin'

有谁知道我能做些什么来解决这个问题?

Does anyone know what I can do to fix this?

推荐答案

TL; DR

您Gruntfile.js里面,你需要更换 VAR模块= / \\模块\\ $名为.js /; VAR模块= / [\\ w /] + module.ts $ /; (632线作为犯#24f1fc1的的发电机

Inside your Gruntfile.js, you need to replace var module = /\.module\.js$/; with var module = /[\w/]+.module.ts$/; (Line 632 as of commit#24f1fc1 of the generator)

/ TL; DR

所以这花了一段时间,并给我带来了不少的页面,但我会尽我所能,给予信贷,这是由于

So this took a while and brought me to quite a few pages, but I'll try my best to give credit where it's due.

首先,我从<一个发现href=\"http://stackoverflow.com/questions/35105628/missing-modules-after-fresh-generation-with-yeomans-angular-fullstack?rq=1\">identical 矿问题,@加布里埃尔 - 库克尔指出,有我安装(不知道你是否应该添加--save或--save-dev的这些命令缺少一些同行的依赖关系,但我用--save- DEV):

First, I noticed from an identical question to mine, @gabriel-kunkel pointed out there were some missing peer dependencies which I installed (not sure if you should add --save or --save-dev to these commands, but I used --save-dev):


  1. NPM安装tslint

  2. NPM安装Kerberos

  3. NPM安装打字稿

  1. npm install tslint
  2. npm install kerberos
  3. npm install typescript

您可能有其他人了,所以看看你的控制台输出的依赖关系树的底部。

You may have others though, so look in your console output at the bottom of the dependency tree.

二,我看到了我关于X $ C $运行时,C-选择 NPM安装并解决这个问题,我发现<一个错误href=\"http://stackoverflow.com/questions/17980759/x$c$c-select-active-developer-directory-error\">here我需要从苹果App Store安装apache code。我装了当时最新的非测试版,这是v7.2.1,然后进入 sudo的X code-选择-s /Applications/X$c$c.app/Contents/Developer 到控制台(为纽带说,您的路径可能会有所不同 - 我的是不是)。

Second, I saw I got an error regarding xcode-select when running npm install and to fix that, I found here that I needed to install xcode from the Apple App Store. I installed the latest non-beta version at the time, which was v7.2.1 and then entered sudo xcode-select -s /Applications/Xcode.app/Contents/Developer into the console (as the link says, your path may be different - mine wasn't).

三,最后,我迷迷糊糊这里其中指出确切什么我需要做什么来解决我的问题。 Gruntfile.js需要一条线被改变......从fdfandrade报价从该链接:

Third and lastly, I stumbled here which stated exactly what I needed to do to fix my problem. Gruntfile.js needed one line to be changed... a quote from fdfandrade from that link:

更换这种变种模块= /.module.js$/;这个VAR模块= /[\\w/]+.module.ts$/;在我Gruntfile.js为我工作!

Replacing this "var module = /.module.js$/;" by this "var module = /[\w/]+.module.ts$/;" in my Gruntfile.js worked for me!

对于我来说,这是行632希望这有助于有人要疯了试图弄清楚这一点东西。

For me, it was line 632. Hope this helps someone else from going insane trying to figure this out.

这篇关于使用约曼的发电机角fullstack代后失踪模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆