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

Error displayed when using dynamic composition (but everything works properly) #56

Closed
aaronroberson opened this issue Jul 18, 2016 · 6 comments
Labels

Comments

@aaronroberson
Copy link

I'm submitting a bug report

  • Library Version:
    @easy-webpack/config-aurelia 2.0.1
  • Operating System:
    OSX 10.x
  • Node Version:
    4.3.2
  • NPM Version:
    3.9.2
  • Webpack AND Version
    webpack 2.1.0-beta.17
  • Browser:
    Chrome
  • Language:
    ESNext

Current behavior:

I’m getting errors when using dynamic composition:

Unable to resolve components/cs-${card.subType}-preview/cs-${card.subType}-preview

The HTML code looks like this:

<compose view-model="components/cs-${card.subType}-preview/cs-${card.subType}-preview" model.bind="card"></compose>

Expected/desired behavior:

The custom component that is dynamically included in the page should remain dynamic and not be parsed by webpack.

@niieani
Copy link
Contributor

niieani commented Jul 18, 2016

This is a valid bug, but doesn't cause any misbehavior if you specify all build resources manually.
It only causes erroneous information to be displayed.

@aaronroberson
Copy link
Author

Gotcha! I'll leave this here as a placeholder for or anyone else to create a PR to update the logging.

@aaronroberson
Copy link
Author

@niieani Should I also be ignoring the following output:

ERROR in ./~/fsevents/~/node-pre-gyp/lib/util/compile.js
Module not found: Error: Can't resolve 'child_process' in '/Users/arob35/Sites/nike/ashpod/node_modules/fsevents/node_modules/node-pre-gyp/lib/util'
 @ ./~/fsevents/~/node-pre-gyp/lib/util/compile.js 9:9-33
 @ ./~/fsevents/~/node-pre-gyp/lib ^\.\/.*$
 @ ./~/fsevents/~/node-pre-gyp/lib/node-pre-gyp.js
 @ ./~/fsevents/fsevents.js
 @ ./~/chokidar/lib/fsevents-handler.js
 @ ./~/chokidar/index.js
 @ ./~/nodemon/lib/monitor/watch.js
 @ ./~/nodemon/lib/monitor/index.js
 @ ./~/nodemon/lib/nodemon.js
 @ ./src ^\.\/.*$
 @ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
 @ multi aurelia

ERROR in ./~/npm/bin/npm-cli.js
Module parse failed: /Users/arob35/Sites/nike/ashpod/node_modules/npm/bin/npm-cli.js Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type.
| #!/usr/bin/env node
| ;(function () { // wrapper in case we're in module_context mode
| 
 @ ./~/npm/lib/npm.js 473:2-30
 @ ./~/fsevents/~/node-pre-gyp/lib/util/compile.js
 @ ./~/fsevents/~/node-pre-gyp/lib ^\.\/.*$
 @ ./~/fsevents/~/node-pre-gyp/lib/node-pre-gyp.js
 @ ./~/fsevents/fsevents.js
 @ ./~/chokidar/lib/fsevents-handler.js
 @ ./~/chokidar/index.js
 @ ./~/nodemon/lib/monitor/watch.js
 @ ./~/nodemon/lib/monitor/index.js
 @ ./~/nodemon/lib/nodemon.js
 @ ./src ^\.\/.*$
 @ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
 @ multi aurelia

ERROR in ./~/fsevents/~/uid-number/uid-number.js
Module not found: Error: Can't resolve 'child_process' in '/Users/arob35/Sites/nike/ashpod/node_modules/fsevents/node_modules/uid-number'
 @ ./~/fsevents/~/uid-number/uid-number.js 9:20-44
 @ ./~/fsevents/~/tar-pack/index.js
 @ ./~/fsevents/~/node-pre-gyp/lib/package.js
 @ ./~/fsevents/~/node-pre-gyp/lib ^\.\/.*$
 @ ./~/fsevents/~/node-pre-gyp/lib/node-pre-gyp.js
 @ ./~/fsevents/fsevents.js
 @ ./~/chokidar/lib/fsevents-handler.js
 @ ./~/chokidar/index.js
 @ ./~/nodemon/lib/monitor/watch.js
 @ ./~/nodemon/lib/monitor/index.js
 @ ./~/nodemon/lib/nodemon.js
 @ ./src ^\.\/.*$
 @ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
 @ multi aurelia

ERROR in ./~/npm/lib/utils/git.js
Module not found: Error: Can't resolve 'child_process' in '/Users/arob35/Sites/nike/ashpod/node_modules/npm/lib/utils'
 @ ./~/npm/lib/utils/git.js 8:11-35
 @ ./~/npm/lib ^\.\/.*\.js$
 @ ./~/npm/lib/npm.js
 @ ./~/fsevents/~/node-pre-gyp/lib/util/compile.js
 @ ./~/fsevents/~/node-pre-gyp/lib ^\.\/.*$
 @ ./~/fsevents/~/node-pre-gyp/lib/node-pre-gyp.js
 @ ./~/fsevents/fsevents.js
 @ ./~/chokidar/lib/fsevents-handler.js
 @ ./~/chokidar/index.js
 @ ./~/nodemon/lib/monitor/watch.js
 @ ./~/nodemon/lib/monitor/index.js
 @ ./~/nodemon/lib/nodemon.js
 @ ./src ^\.\/.*$
 @ ./~/aurelia-loader-webpack/dist/commonjs/aurelia-loader-webpack.js
 @ multi aurelia

@niieani
Copy link
Contributor

niieani commented Jul 18, 2016

No, this seems like an error of another kind, related to your dependencies.

As for the topic of this issue, I'll fix this either by ignoring ${...} or by resolving to a glob pattern, where * replaces any ${...} unless ${...} is the only thing there.

@EisenbergEffect
Copy link
Contributor

@niieani Can this be closed?

@niieani
Copy link
Contributor

niieani commented Jul 20, 2016

No, this has not been fixed yet. I'm keeping tabs on the issues on all the webpack repos.
It's not a serious issue though, it's only an incorrectly displayed error.

@niieani niieani added the bug label Jul 20, 2016
@niieani niieani changed the title Cannot use dynamic composition Error displayed when using dynamic composition (but everything works properly) Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants