【发布时间】:2017-11-24 04:49:49
【问题描述】:
我是 angular 和 typescript 的新手,我正在努力导入 @types/three npm 包,我只是创建了一个新的 angular 项目,我尝试导入并使用这三个包,但我一直收到此错误
Module not found: Error: Can't resolve 'three' in 'E:\wamp64\www\pro-website-angular5\src\app'
我一定是在做一些新的错误,但我不知道,这是我的代码
import { Component } from '@angular/core';
import * as THREE from 'three';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent{
title = new THREE.Vector3(1,1,1);
}
【问题讨论】:
-
路径“三”作为该文件的相关路径是否正确?
标签: node.js angular typescript npm