Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

userland files #72

Closed
noslouch opened this issue May 15, 2017 · 1 comment
Closed

userland files #72

noslouch opened this issue May 15, 2017 · 1 comment

Comments

@noslouch
Copy link

noslouch commented May 15, 2017

Not sure if this is an undocumented requirement or a feature still in progress, but userland files break the build.

If an unexpected file is found outside of src/ui or src/utils, the build bails out.

$ ember -v
ember-cli: 2.14.0-beta.1
node: 6.9.2
os: darwin x64

$ ember new my-app -b @glimmer/blueprint
...

$ cd my-app
$ vim src/data.ts
...

// src/data.ts
export default {
  foo: "bar"
}

$ ember s
Livereload server on http://localhost:49153
The Broccoli Plugin: [ResolutionMapBuilder] failed with:
Error: The type of module 'data' could not be identified
    at module.exports (/Users/noslouch/projects/my-app/node_modules/@glimmer/resolution-map-builder/lib/get-module-specifier.js:72:15)
    at mappedPaths.forEach.modulePath (/Users/noslouch/projects/my-app/node_modules/@glimmer/resolution-map-builder/lib/index.js:124:21)
    at Array.forEach (native)
    at ResolutionMapBuilder.build (/Users/noslouch/projects/my-app/node_modules/@glimmer/resolution-map-builder/lib/index.js:120:15)
    at /Users/noslouch/projects/my-app/node_modules/broccoli-plugin/read_compat.js:93:34
    at tryCatch (/Users/noslouch/projects/my-app/node_modules/rsvp/dist/rsvp.js:539:12)
    at invokeCallback (/Users/noslouch/projects/my-app/node_modules/rsvp/dist/rsvp.js:554:13)
    at publish (/Users/noslouch/projects/my-app/node_modules/rsvp/dist/rsvp.js:522:7)
    at flush (/Users/noslouch/projects/my-app/node_modules/rsvp/dist/rsvp.js:2414:5)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)

The broccoli plugin was instantiated at:
    at ResolutionMapBuilder.Plugin (/Users/noslouch/projects/my-app/node_modules/broccoli-plugin/index.js:7:31)
    at new ResolutionMapBuilder (/Users/noslouch/projects/my-app/node_modules/@glimmer/resolution-map-builder/lib/index.js:60:10)
    at GlimmerApp.buildResolutionMap (/Users/noslouch/projects/my-app/node_modules/@glimmer/application-pipeline/dist/lib/broccoli/glimmer-app.js:267:16)
    at GlimmerApp.buildConfigTree (/Users/noslouch/projects/my-app/node_modules/@glimmer/application-pipeline/dist/lib/broccoli/glimmer-app.js:260:30)
    at GlimmerApp.javascript (/Users/noslouch/projects/my-app/node_modules/@glimmer/application-pipeline/dist/lib/broccoli/glimmer-app.js:181:31)
    at GlimmerApp.toTree (/Users/noslouch/projects/my-app/node_modules/@glimmer/application-pipeline/dist/lib/broccoli/glimmer-app.js:228:27)
    at module.exports (/Users/noslouch/projects/my-app/ember-cli-build.js:23:14)
    at Builder.setupBroccoliBuilder (/Users/noslouch/projects/my-app/node_modules/ember-cli/lib/models/builder.js:56:19)
    at new Builder (/Users/noslouch/projects/my-app/node_modules/ember-cli/lib/models/builder.js:30:10)
    at ServeTask.run (/Users/noslouch/projects/my-app/node_modules/ember-cli/lib/tasks/serve.js:24:55)

But if I make a src/utils directory and move in my userland file, it works.

$ mkdir src/utils
$ mv src/data src/utils
$ ember s
// success
@noslouch noslouch changed the title importing userland files userland files May 16, 2017
@noslouch
Copy link
Author

This is an issue in resolution-map-builder glimmerjs/resolution-map-builder#8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant