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 paths - helpers.root('node_modules') #1245

Closed
gbmeow opened this issue Dec 7, 2016 · 1 comment
Closed

Relative paths - helpers.root('node_modules') #1245

gbmeow opened this issue Dec 7, 2016 · 1 comment

Comments

@gbmeow
Copy link

gbmeow commented Dec 7, 2016

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    n/a

  • What is the current behavior?
    n/a

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
    https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

  • What is the expected behavior?

  • What is the motivation / use case for changing the behavior?

  • Please tell us about your environment:

  • Angular version: 2.0.0-beta.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Error Unexpected value 'FileUploadModule' imported by the module 'UploaderModule'

valor-software/ng2-file-upload#426

Is there a reason - why - we need relative paths for external Typescript modules?
Is it a systemjs that cannot load - a typescript only NODE_MODULE

C:\workspace\angular2-webpack-starter\config\webpack.common.js
Does not work - modules: [helpers.root('src'), 'node_modules' ],
Works - modules: [helpers.root('src'), helpers.root('node_modules' )],

How to replicate?

  1. npm install - https://github.com/AngularClass/angular2-webpack-starter
  2. npm install https://github.com/georgebatalinski/PUBLIC_NODE_MODULE
  3. C:\workspace\angular2-webpack-starter\src\app\app.module.ts
import { FunBoardModule } from 'public_node_module';
...
imports: [ // import Angular's modules
    ...,
    FunBoardModule,
  ],
  1. npm start
    Expected: get error

####TO fix
C:\workspace\angular2-webpack-starter\config\webpack.common.js
change - modules: [helpers.root('src'), 'node_modules' ],
to [helpers.root('src'), helpers.root('node_modules' )],

@karolmie1
Copy link
Contributor

different problem, same solution: #1114

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