SpoonX / aurelia-api

A simple convenience wrapper around aurelia-fetch-client
http://aurelia-api.spoonx.org
MIT License
72 stars 21 forks source link

Unable to find module with ID: aurelia-api when using Webpack Skeleton and Visual Studio #204

Closed robscottnh closed 6 years ago

robscottnh commented 7 years ago

I'm sure that there's some sort of workaround at this point, but after several hours of research I'm stumped on how to proceed to resolve this.

I've installed using npm install aurelia-api -- save and see a corresponding entry in my package.json file:

"aurelia-api": "3.1.1" ,

I've added the following to boot.ts:

aurelia.use .standardConfiguration() ... .plugin(PLATFORM.moduleName("aurelia-api", (config:any) => {...}))

However, when I run the app I get the following error:

Uncaught (in promise) Error: Unable to find module with ID: aurelia-api at WebpackLoader. (aurelia-loader-webpack.js:187) at step (aurelia-loader-webpack.js:36) ...

RWOverdijk commented 7 years ago

That's strange. I haven't heard this before. I've asked the question in our gitter channel

robscottnh commented 7 years ago

Thanks for following up. I'll keep an eye out there and here.

robscottnh commented 7 years ago

It didn't look like anyone had an idea. Am I right?

MarcScheib commented 6 years ago

I am using the plugin in my webpack app as well, without any errors. Can you provide some more code insight?

robscottnh commented 6 years ago

Hey Marc,

I'll try to get you some more info later today.. I'm travelling right now. I really appreciate the time.

Rob

On Wed, Nov 8, 2017 at 3:47 AM, Marc Scheib notifications@github.com wrote:

I am using the plugin in my webpack app as well, without any errors. Can you provide some more code insight?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SpoonX/aurelia-api/issues/204#issuecomment-342749930, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxNKuGKCobdC6f_9PA3M7g6xbXa2NTMks5s0WqKgaJpZM4QIBge .

robscottnh commented 6 years ago

Marc,

Did you use a skeleton to create your project? I'm trying to create a minimal skeleton to show the problem. (Not sure what was originally used to create the code base I'm working on).

Regards, Rob

On Wed, Nov 8, 2017 at 9:04 AM, Rob Scott robscottnh@gmail.com wrote:

Hey Marc,

I'll try to get you some more info later today.. I'm travelling right now. I really appreciate the time.

Rob

On Wed, Nov 8, 2017 at 3:47 AM, Marc Scheib notifications@github.com wrote:

I am using the plugin in my webpack app as well, without any errors. Can you provide some more code insight?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SpoonX/aurelia-api/issues/204#issuecomment-342749930, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxNKuGKCobdC6f_9PA3M7g6xbXa2NTMks5s0WqKgaJpZM4QIBge .

MarcScheib commented 6 years ago

@robscottnh yes, basically I am using the webpack typescript sekeleton (no cli project).

robscottnh commented 6 years ago

Hey Marc,

Just getting back to this. Do you have a link to the skeleton you used? I used one from here:

https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/#comments

I'm betting you used a different one. I'd like to take a look at it. My guess is the webpack configs are different and that's probably where my issue lies.

Thanks, Rob

On Wed, Nov 8, 2017 at 4:24 PM, Marc Scheib notifications@github.com wrote:

@robscottnh https://github.com/robscottnh yes, basically I am using the webpack typescript sekeleton (no cli project).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SpoonX/aurelia-api/issues/204#issuecomment-342964815, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxNKvQVBoXZnjoiDPEQ07AW5R-a7v9Dks5s0hwqgaJpZM4QIBge .

doktordirk commented 6 years ago

Could be:

From our install instructions:

Webpack
Run npm i aurelia-api --save from your project root.

Add 'aurelia-api' in the coreBundles.aurelia section of your webpack.config.js.
RWOverdijk commented 6 years ago

Closing this for now. If this is still relevant, feel free to reopen the issue.

Note: this is a copy-paste comment to clean up the issues. It's not personal, and I didn't review the issue before posting this. They're all outdated and I need a way to figure out what's still relevant.

Thank you for understanding :)