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

relative Imports using baseUrl (tsconfig) not working #359

Open
Laxusgee opened this issue Sep 19, 2017 · 0 comments
Open

relative Imports using baseUrl (tsconfig) not working #359

Laxusgee opened this issue Sep 19, 2017 · 0 comments

Comments

@Laxusgee
Copy link

Setting baseUrl to '.' not working for imports.

Here is my tsconfig.json
{ "compilerOptions": { "target": "es5", "module": "commonjs", "baseUrl": ".", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "noEmitHelpers": true, "noUnusedLocals": false, "noUnusedParameters": false, "moduleResolution": "node", "typeRoots": [ "node_modules/@types" ], "lib": ["es6", "dom"] }, "exclude": [ "node_modules" ], "awesomeTypescriptLoaderOptions": { "forkChecker": true, "useWebpackText": true }, "angularCompilerOptions": { "debug": false }, "compileOnSave": false, "buildOnSave": false, "atom": { "rewriteTsconfig": false } }

My app.module

`import { NgModule, ApplicationRef } from '@angular/core';

import { ModulesModule } from 'src/modules/modules.module';`

I have the error

Uncaught Error: Cannot find module "src/modules/modules.module" at webpackMissingModule (eval at <anonymous> (app.js:899), <anonymous>:19:88) at eval (eval at <anonymous> (app.js:899), <anonymous>:19:192) at Object.<anonymous> (app.js:899) at __webpack_require__ (polyfills.js:53) at eval (eval at <anonymous> (app.js:811), <anonymous>:5:20) at Object.<anonymous> (app.js:811) at __webpack_require__ (polyfills.js:53) at Object.<anonymous> (app.js:1238) at __webpack_require__ (polyfills.js:53) at webpackJsonpCallback (polyfills.js:24) at app.js:1 webpackMissingModule @ app.module.ts?0317:23 (anonymous) @ app.module.ts?0317:23 (anonymous) @ app.js:899 __webpack_require__ @ polyfills.js:53 (anonymous) @ main.ts?23fb:3 (anonymous) @ app.js:811 __webpack_require__ @ polyfills.js:53 (anonymous) @ app.js:1238 __webpack_require__ @ polyfills.js:53 webpackJsonpCallback @ polyfills.js:24 (anonymous) @ app.js:1 client?cd17:40 [WDS] Errors while compiling. Reload prevented.

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

1 participant