tildeio / libkit

17 stars 4 forks source link

New version (0.7.0-beta) blueprint fails to complete #14

Closed lisaychuang closed 6 years ago

lisaychuang commented 6 years ago

I tried to create a new lib using this blueprint (not in a yarn workspace), and it looks like the find-yarn-workspace-root is causing some sort of failure.


ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - codeFrame: [undefined]
  - errorMessage: The "path" argument must be of type string. Received type undefined
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: The "path" argument must be of type string. Received type undefined
  - name: TypeError [ERR_INVALID_ARG_TYPE]
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at assertPath (path.js:39:11)
    at Object.normalize (path.js:1122:5)
    at findWorkspaceRoot (/Users/lizhuang/bite-log/node_modules/find-yarn-workspace-root/index.js:17:22)
    at new PackageBuild (/Users/lizhuang/bite-log/node_modules/libkit/lib/ember-cli-build/index.js:157:25)
    at buildPackage (/Users/lizhuang/bite-log/node_modules/libkit/lib/ember-cli-build/index.js:108:15)
    at /Users/lizhuang/bite-log/node_modules/libkit/lib/ember-cli-build/index.js:89:12
    at Builder.setupBroccoliBuilder (/Users/lizhuang/bite-log/node_modules/ember-cli/lib/models/builder.js:51:19)
    at new Builder (/Users/lizhuang/bite-log/node_modules/ember-cli/lib/models/builder.js:29:10)
    at BuildTask.run (/Users/lizhuang/bite-log/node_modules/ember-cli/lib/tasks/build.js:15:19)
    at Promise.resolve.then (/Users/lizhuang/bite-log/node_modules/ember-cli/lib/models/command.js:243:46)
``
lisaychuang commented 6 years ago

Using v0.6.0 worked fine for me

chancancode commented 6 years ago

@lisaychuang sorry for the delay! just ran into this myself.

I think I fixed it now, the problem is ember-cli-build.js in the blueprint is missing a required field. If or when you upgrade to 0.7.x you would have to add that to the generated file (there may be changes too, so using ember init is probably better).