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

aio app:deploy error if static project contains files with .mst extension #134

Closed
mhaack opened this issue Nov 25, 2020 · 5 comments · Fixed by #141
Closed

aio app:deploy error if static project contains files with .mst extension #134

mhaack opened this issue Nov 25, 2020 · 5 comments · Fixed by #141
Assignees
Labels
bug Something isn't working

Comments

@mhaack
Copy link

mhaack commented Nov 25, 2020

Describe the bug
A static project containing .mst files (mustache templates) can not be deployed. Debug log:

Deploying actions
⠋ Deploying web assets  @adobe/aio-lib-core-tvm:debug initializing with config: {
  @adobe/aio-lib-core-tvm:debug   "ow": {
  @adobe/aio-lib-core-tvm:debug     "namespace": "278519-mhtest-stage",
  @adobe/aio-lib-core-tvm:debug     "auth": "<hidden>"
  @adobe/aio-lib-core-tvm:debug   },
  @adobe/aio-lib-core-tvm:debug   "apiUrl": "https://firefly-tvm.adobe.io",
  @adobe/aio-lib-core-tvm:debug   "cacheFile": "/Users/mhaack/workspaces/playground/aio-pwa/.aws.tmp.creds.json"
  @adobe/aio-lib-core-tvm:debug }
  @adobe/aio-lib-core-tvm:debug read credentials from cache file with key b96338bb5bc5e6512bd5f8cf241b7168c3d302052818878a5188b8797fc8ef5c
TypeError: mimeType.startsWith is not a function
    at RemoteStorage._getCacheControlConfig (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@adobe/aio-lib-web/lib/remote-storage.js:179:25)
    at RemoteStorage.uploadFile (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@adobe/aio-lib-web/lib/remote-storage.js:110:37)
    at async /Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@adobe/aio-lib-web/lib/remote-storage.js:157:21
    at async Promise.all (index 42)
    at async Object.deployWeb (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@adobe/aio-lib-web/src/deploy-web.js:58:3)
    at async Deploy.run (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@adobe/aio-cli-plugin-app/src/commands/app/deploy.js:108:35)
    at async Deploy._run (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@oclif/config/lib/config.js:173:24)
    at async Main.run (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async Main._run (/Users/mhaack/.nvm/versions/node/v12.13.0/lib/node_modules/@adobe/aio-cli/node_modules/@oclif/command/lib/command.js:43:20)

Sample files can be found here: https://github.com/magento/pwa-studio/tree/develop/packages/venia-ui/templates

Expected behavior
Deployment is working.

Additional context
aio cli version:

System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 441.09 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.0 - ~/.nvm/versions/node/v12.13.0/bin/node
    Yarn: 1.22.0 - /usr/local/bin/yarn
    npm: 6.12.0 - ~/.nvm/versions/node/v12.13.0/bin/npm
  Virtualization:
    Docker: 19.03.13 - /usr/local/bin/docker
  npmGlobalPackages:
    @adobe/aio-cli: 5.0.1
  CLI plugins:
    @adobe/aio-cli 5.0.1 (core)
    @adobe/aio-cli-plugin-app 5.2.1 (core)
    @adobe/aio-cli-plugin-auth 2.4.0 (core)
    @adobe/aio-cli-plugin-certificate 0.2.0 (core)
    @adobe/aio-cli-plugin-cloudmanager 0.18.2 (user)
    @adobe/aio-cli-plugin-config 2.3.0 (core)
    @adobe/aio-cli-plugin-console 3.2.0 (core)
    @adobe/aio-cli-plugin-events 1.1.0 (core)
    @adobe/aio-cli-plugin-info 1.1.1 (core)
    @adobe/aio-cli-plugin-runtime 3.0.0 (core)
    @oclif/plugin-autocomplete 0.2.0 (core)
    @oclif/plugin-help 2.2.3 (core)
    @oclif/plugin-not-found 1.2.4 (core)
    @oclif/plugin-plugins 1.9.4 (core)
    @oclif/plugin-warn-if-update-available 1.7.0 (core)
@meryllblanchet
Copy link

Thanks for raising the issue @mhaack!
@purplecabbage would there be any workaround while we'd work on the resolution?

@moritzraho
Copy link
Member

moritzraho commented Nov 25, 2020

some more details on the probable cause:

@aiojbot
Copy link
Collaborator

aiojbot commented Nov 25, 2020

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-967

@purplecabbage purplecabbage transferred this issue from adobe/aio-cli-plugin-app Nov 25, 2020
@purplecabbage
Copy link
Member

This is a problem with how we treat false/missing values returned by https://www.npmjs.com/package/mime-types

@purplecabbage purplecabbage self-assigned this Dec 10, 2020
@meryllblanchet meryllblanchet added the bug Something isn't working label Dec 16, 2020
@aiojbot
Copy link
Collaborator

aiojbot commented Dec 16, 2020

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants