-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Cannot find name 'require'. using relative paths... #2221
Comments
Same here, strangely enough the application still seems to work. |
Ahhh here we go, try adding To src/typings.d.ts |
ha great!!! |
@hansl I had to add |
Hi, Thanks in advance 😉 |
It's just telling the typescript compiler that there is a global function On Sun, Sep 25, 2016, 1:53 PM Eugenio Lentini notifications@github.com
|
FYI: I've fixed the original problem by adding
|
Add typing.d.ts in main folder of the application and over there declare the varible which you want to use every time As for example:
after declaring this in typing.d.ts, error for "require" and "system" will not come in the application.. |
I fix it, by try adding declare var require: NodeRequire; To src/typings.d.ts, hope it can help you |
When I used:
Npm functioned but in visual studio I got:
When I used:
npm and visual studio failed on:
Adding to tsconfig.json didn't help:
I ended up dumping a bunch of stuff in src/typings.d.ts
|
For me it was a typeRoots issue, need to ensure that it points correctly to node_modules if tsconfig is in the /src/ folder. "typeRoots": [ |
I had a duplicated type and that was causing the same issue. |
I had a similar issue and the error is gone after I removed
from tsconfig.app.json which in /src/ folder or you can add
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I am using a config with relative paths for style and template:
and getting an error of
running:
angular-cli: 1.0.0-beta.14
node: 6.5.0
os: win32 x64
regards
Sean
The text was updated successfully, but these errors were encountered: