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

Can't resolve 'aurelia-loader-context' #11

Closed
heruan opened this issue Jun 22, 2016 · 2 comments
Closed

Can't resolve 'aurelia-loader-context' #11

heruan opened this issue Jun 22, 2016 · 2 comments

Comments

@heruan
Copy link

heruan commented Jun 22, 2016

I'm new to webpack and I set up a very simple project with just this index.js:

import {bootstrap} from "aurelia-bootstrapper-webpack";
import {Aurelia} from "aurelia-framework";

bootstrap(async (aurelia) => {
    aurelia.use.standardConfiguration().developmentLogging();
    await aurelia.start();
    aurelia.setRoot("app", document.body);
});

but trying to bundle with webpack I get this warning:

WARNING in ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
Module not found: Error: Can't resolve 'aurelia-loader-context' @ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js 104:25-66

and if I ignore it and run the app in the browser I get this:

bundle.js:624 Uncaught (in promise) Error: Cannot find module "aurelia-loader-context"
    at webpackMissingModule (http://localhost:8888/bundle.js:624:71)
    at http://localhost:8888/bundle.js:624:170
@heruan
Copy link
Author

heruan commented Jun 22, 2016

Using AureliaWebpackPlugin in webpack.config.js solves this, and I also understood the use of packages.json/aurelia/build/resources. I now get this instead:

<aurelia-bootstrapper-webpack> [package.json] required "./aurelia-templating-resources" from "aurelia-templating-resources".
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/compose", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/if", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/with", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/repeat", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/show", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/hide", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/replaceable", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/sanitize-html", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/focus", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/binding-mode-behaviors", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/throttle-binding-behavior", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/debounce-binding-behavior", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/signal-binding-behavior", which does not exist.
[<aurelia-templating-resources>] wants to require "aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/update-trigger-binding-behavior", which does not exist.
<aurelia-bootstrapper-webpack> [package.json] required "./aurelia-templating-router" from "aurelia-templating-router".
[<aurelia-templating-router>] wants to require "aurelia-templating-router/aurelia-bootstrapper-webpack/dist/commonjs/router-view", which does not exist.
[<aurelia-templating-router>] wants to require "aurelia-templating-router/aurelia-bootstrapper-webpack/dist/commonjs/route-href", which does not exist.

where it seems to be an incorrect aurelia-bootstrapper-webpack string in the path, e.g. in

aurelia-templating-resources/aurelia-bootstrapper-webpack/dist/commonjs/compose

which does not exists but

aurelia-templating-resources/dist/commonjs/compose

does.

@heruan
Copy link
Author

heruan commented Jun 22, 2016

Related to aurelia/webpack-plugin#39.

@heruan heruan closed this as completed Jun 22, 2016
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