Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import {ContactService} from 'shared/contact.service'; #1

Open
liudianliang opened this issue Feb 20, 2017 · 4 comments
Open

import {ContactService} from 'shared/contact.service'; #1

liudianliang opened this issue Feb 20, 2017 · 4 comments

Comments

@liudianliang
Copy link

import {ContactService} from 'shared/contact.service';
这段代码报错,貌似不影响运行
[ts] Cannot find module 'shared/contact.service'.

@ghost
Copy link

ghost commented Feb 20, 2017

HI ~
这是编译时期抛出的错误?我在本地试了下,编译正常,运行也正常,没有报错。
你本地的 webpack 和 TypeScript 版本是?

@crazybber
Copy link

看起来是模块解析异常了,重新拿一下代码试试。

@HotEvent
Copy link

HotEvent commented Mar 5, 2017

......貌似在vsc上报的错,我尝试加了../就不报错了

@ghost
Copy link

ghost commented Mar 5, 2017

有人抛出过这个问题:http://stackoverflow.com/questions/38044010/make-vs-code-read-webpack-config-and-recognize-path-with-alias

可以试试他提供的方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants