Câu hỏiGrunt nguyên cảo không thể tìm thấy lõi góc
tại sao cant biên dịch Grunt nguyên cảo của tôi tìm ra cốt lõi góc?
Tôi đoán nó có liên quan đến đường dẫn để trình biên dịch không thể tìm thấy thư mục libs trong thư mục node_modules.
Lỗi
nguyên cảo/add.component.ts (1,25): Lỗi TS2307: Không thể tìm thấy mô-đun 'angular2/lõi'.
Cài đặt
Gruntfile.js công tác
typescript: {
all: {
src: ['typescript/**/*.ts'],
dest: 'javascript/frontend',
options: {
target: "es5",
module: "system",
moduleResolution: "node",
emitDecoratorMetadata: true,
experimentalDecorators: true,
removeComments: false,
noImplicitAny: false
}
}
nguyên cảo/add.component.ts
import {Component} from 'angular2/core';
@Component({
selector: 'mytest',
template: '<h1>test</h1>'
})
export class AppComponent { }
node_modules
- Bao gồm angular2
- Bao gồm nguyên cảo
filepaths
app -- node_modules
-- typescript
-- app.component.ts
-- Gruntfile.js
-- package.json
Dùng libs/khung/hướng dẫn
- Grunt nguyên cảo Github
- Angular2 5min Quickstart
Tôi là một n00b Angular2 nhưng hầu hết các ví dụ tôi thấy sử dụng Gulp. Chúng tôi hiện đang xem xét Webpack cho các bản dựng của chúng tôi. –