-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Can't figure out a normalized module name for #125
Comments
I have tried using:
since components folder sit on the root of the project (src), so it should work, I get a different error: Module not found: Error: Can't resolve 'components/f7-view' in 'c:\project\project-folder\dist\native-modules' |
Also tried in package.json:
No joy :( |
@luisvsilva Do you have a demo project? Would you mind trying |
Tried that and same result, this is a repo testing my project: https://github.com/luisvsilva/test-f7 The actual project is here: https://github.com/radical-systems-australia/aurelia-framework7-typescript |
@luisvsilva I was able to build successfully when I commented out: // new ModuleDependenciesPlugin(
// {
// "aurelia-framework7-typescript":[
// "components/f7-view"
// ]
// }), From your webpack config. |
Ha yes, my bad, I forgot that there while debugging. So now it builds ok, if package is loaded via npm install. I am still hitting the original problem if I use npm link as opposed to install. You can replicate it by
This is in windows, not sure if I am hitting a bug with symlinks on windows |
Can I ask why you are using link? You should instead either create an alias or add a webpack resolver path pointing to your internal npm module. |
I thought link was the way you can develop your module while testing it on the fly from another project. is there a better solution for this? How would I use an alias? or a webpack resolver? |
Disclaimer: I was away and did not read the full thread above. If you work with links, you must set the environement variable |
Is this valid for windows as well? |
I work on a Windows10 machine, so definitely yes. |
I think I am hitting the same issue here related to using this plugin in the context of a monorepo. I got this structure: inside my /aurelia-components-demo/package.json, when I reference the module on my npm repo like this: everything works just fine and I am able to This is not that good because I want to have the demo refresh when I change the components. So what I tried to do instead of what I have above is to reference the package on disk: As soon as I do this, when I I saw similar problems on other threads on react, etc. Is this a limitation of webpack? |
Hard to say like that, this is tricky situations and I would need more details. Maybe fill a separate issue. I'm not too familiar with @luisvsilva if this issue was caused by symlinks, did my tip above help you? can we close this? |
Yes, it was, this can be closed. Thanks for your help |
This works, Thank You 😄 |
@Sayan751 Yeah, a page about monorepo would be nice. I had a very hard time setting one up last week. It's hard :( BTW, with Webpack 4, is |
@jods4 BTW you can check https://github.com/Sayan751/aurelia-lerna-sample for an aurelia-lerna sample. Though I have created this to report bug/ask question, the build system works. |
@Sayan751 I have seen your other issue about mono-repo. There are many pitfalls about mono-repo (some you have not mentionned yet in that other issue). |
I'm submitting a bug report
2.0.0-rc.5
Please tell us about your environment:
Operating System:
Windows 8
Node Version:
7.1.0
NPM Version:
3.10.9
JSPM OR Webpack AND Version
webpack 3.6.0
Browser:
Chrome
Language:
TypeScript 2.3.2
Current behavior:
Importing module from plugin results in:
Can't figure out a normalized module name for ./components/F7NavLeft, please call PLATFORM.moduleName()
Declaration of modules in plugin is done via:
And in consumer the plugin is imported with:
Expected/desired behavior:
Module should be imported, but it is currently failing
The text was updated successfully, but these errors were encountered: