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

Causes build error with ember-cli-deploy #62

Closed
devinrhode2 opened this issue Oct 5, 2016 · 4 comments
Closed

Causes build error with ember-cli-deploy #62

devinrhode2 opened this issue Oct 5, 2016 · 4 comments

Comments

@devinrhode2
Copy link

devinrhode2 commented Oct 5, 2016

For some reason ember-cli-favicon is causing this error when I run ember deploy production:

➤ ember deploy production
DEPRECATION: ember-cli-htmlbars-inline-precompile is opting out of caching due to an AST plugin that does not provide a caching strategy: `touch-action`.
DEPRECATION: ember-cli-htmlbars is opting out of caching due to an AST plugin that does not provide a caching strategy: `touch-action`.
- build failed
Error: The Broccoli Plugin: [CachingWriter] failed with:
Error: ENOENT: no such file or directory, stat '/Users/devinrhode2/repos/Chatbot-Front-End/tmp/caching_writer-input_base_path-4QNtpNfX.tmp/0/favicon.png'
    at Error (native)
    at Object.fs.statSync (fs.js:844:18)
    at CachingWriter.keyForFile (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/broccoli-favicon/node_modules/broccoli-caching-writer/index.js:87:20)
    at Array.map (native)
    at CachingWriter._conditionalBuild (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/broccoli-favicon/node_modules/broccoli-caching-writer/index.js:109:65)
    at /Users/devinrhode2/repos/Chatbot-Front-End/node_modules/broccoli-favicon/node_modules/broccoli-plugin/read_compat.js:61:34
    at tryCatch (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
    at invokeCallback (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
    at publish (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:7)
    at flush (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/asap.js:85:5)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

The broccoli plugin was instantiated at: 
    at CachingWriter.Plugin (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/broccoli-favicon/node_modules/broccoli-plugin/index.js:10:31)
    at new CachingWriter (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/broccoli-favicon/node_modules/broccoli-caching-writer/index.js:18:10)
    at CachingWriter.Favicons (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/broccoli-favicon/index.js:45:10)
    at CoreObject.module.exports.postprocessTree (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-favicon/index.js:24:22)
    at /Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli/lib/broccoli/ember-app.js:541:27
    at Array.forEach (native)
    at EmberApp.addonPostprocessTree (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli/lib/broccoli/ember-app.js:539:23)
    at EmberApp.toTree (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli/lib/broccoli/ember-app.js:1631:15)
    at module.exports (/Users/devinrhode2/repos/Chatbot-Front-End/ember-cli-build.js:53:14)
    at CoreObject.module.exports.Task.extend.setupBroccoliBuilder (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli/lib/models/builder.js:74:19)
    at CoreObject.module.exports.Task.extend.init (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli/lib/models/builder.js:54:10)
    at CoreObject.superWrapper [as init] (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli/node_modules/core-object/lib/assign-properties.js:32:18)
    at CoreObject.Class (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli/node_modules/core-object/core-object.js:32:33)
    at Class.DeployPluginBase.extend.build (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy-build/index.js:26:23)
    at Object._pipeline.register.fn (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:93:21)
    at Pipeline._notifyPipelinePluginHookExecution (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy/lib/models/pipeline.js:175:19)
    at tryCatch (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
    at invokeCallback (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
    at /Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/then.js:29:16
    at flush (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/asap.js:85:5)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

Pipeline aborted

When I remove ember-cli-favicon, this error disappears, and my deploy is successful.

This happens whether I have this configuration:

    favicon: {
      config: {
        // these options are passed directly to the favicons module https://github.com/haydenbleasel/favicons#usage
        appName: "removed",                  // Your application's name. `string`
        appDescription: "Buy Cheap Concert Tickets Now",           // Your application's description. `string`
        developerName: "removed",            // Your (or your developer's) name. `string`
        developerURL: "http://heyimlea.com/",             // Your (or your developer's) URL. `string`
        background: "#fff",             // Background colour for flattened icons. `string`
        path: "/",                      // Path for overriding default icons path. `string`
        display: "browser",          // Android display: "browser" or "standalone". `string`
        orientation: "portrait",        // Android orientation: "portrait" or "landscape". `string`
        start_url: "/?fromHomescreen=true",    // Android start application's URL. `string`
        version: "3.0",                 // Your application's version number. `number`
        logging: false,                 // Print logs to console? `boolean`
        online: false,                  // Use RealFaviconGenerator to create favicons? `boolean`
        preferOnline: true,            // Use offline generation, if online generation has failed. `boolean`
        icons: {
            android: true,              // Create Android homescreen icon. `boolean`
            appleIcon: true,            // Create Apple touch icons. `boolean` or `{ offset: offsetInPercentage }`
            appleStartup: true,         // Create Apple startup images. `boolean`
            coast: { offset: 25 },      // Create Opera Coast icon with offset 25%. `boolean` or `{ offset: offsetInPercentage }`
            favicons: true,             // Create regular favicons. `boolean`
            firefox: true,              // Create Firefox OS icons. `boolean` or `{ offset: offsetInPercentage }`
            windows: true,              // Create Windows 8 tile icons. `boolean`
            yandex: true                // Create Yandex browser icon. `boolean`
        } 
      }
    }

or this config:

    favicon: {
      config: {
        // these options are passed directly to the favicons module https://github.com/haydenbleasel/favicons#usage
        appName: "removed",                  // Your application's name. `string`
        appDescription: "Buy Cheap Concert Tickets Now",           // Your application's description. `string`
        developerName: "removes",            // Your (or your developer's) name. `string`
        developerURL: "removes",             // Your (or your developer's) URL. `string`
        background: "#fff",             // Background colour for flattened icons. `string`
        path: "/",                      // Path for overriding default icons path. `string`
        display: "standalone",          // Android display: "browser" or "standalone". `string`
        orientation: "portrait",        // Android orientation: "portrait" or "landscape". `string`
        start_url: "/?fromHomescreen=true",    // Android start application's URL. `string`
        version: "3.0",                 // Your application's version number. `number`
        logging: true, //CHANGED
        online: true, //CHANGED
        preferOnline: true,            // Use offline generation, if online generation has failed. `boolean`
        icons: {
            android: true,              // Create Android homescreen icon. `boolean`
            appleIcon: true,            // Create Apple touch icons. `boolean` or `{ offset: offsetInPercentage }`
            appleStartup: true,         // Create Apple startup images. `boolean`
            coast: { offset: 25 },      // Create Opera Coast icon with offset 25%. `boolean` or `{ offset: offsetInPercentage }`
            favicons: true,             // Create regular favicons. `boolean`
            firefox: true,              // Create Firefox OS icons. `boolean` or `{ offset: offsetInPercentage }`
            windows: true,              // Create Windows 8 tile icons. `boolean`
            yandex: true                // Create Yandex browser icon. `boolean`
        } 
      }
    }

As for the ember-cli-deploy-build plugin (presumably a build error when doing a deploy causes this) Well.. removing it causes a different error:

undefinedis not an existing location
TypeError: path must be a string
TypeError: path must be a string
    at TypeError (native)
    at Object.fs.readdirSync (fs.js:808:18)
    at dirParseSync (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ftp-deploy/ftp-deploy.js:63:14)
    at configComplete (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ftp-deploy/ftp-deploy.js:191:22)
    at [object Object].deploy (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ftp-deploy/ftp-deploy.js:173:13)
    at tryApply (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/node.js:27:7)
    at handleValueInput (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/node.js:241:16)
    at fn (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/node.js:231:14)
    at Class.BasePlugin.extend.upload (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy-ftp/index.js:43:16)
    at Object._pipeline.register.fn (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:93:21)
    at Pipeline._notifyPipelinePluginHookExecution (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy/lib/models/pipeline.js:175:19)
    at tryCatch (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
    at invokeCallback (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
    at /Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/then.js:29:16
    at flush (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/asap.js:85:5)
    at nextTickCallbackWith0Args (node.js:420:9)
Pipeline aborted

Now also uninstalling ember-cli-favicon gives the same error message with a shorter stack trace:

undefinedis not an existing location
TypeError: path must be a string
TypeError: path must be a string
    at TypeError (native)
    at Object.fs.readdirSync (fs.js:808:18)
    at dirParseSync (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ftp-deploy/ftp-deploy.js:63:14)
    at configComplete (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ftp-deploy/ftp-deploy.js:191:22)
    at [object Object].deploy (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ftp-deploy/ftp-deploy.js:173:13)
    at tryApply (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/node.js:27:7)
    at handleValueInput (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/node.js:241:16)
    at fn (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/rsvp/dist/lib/rsvp/node.js:231:14)
    at Class.BasePlugin.extend.upload (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy-ftp/index.js:43:16)
    at Object._pipeline.register.fn (/Users/devinrhode2/repos/Chatbot-Front-End/node_modules/ember-cli-deploy/lib/tasks/pipelPipeline aborted

Last but not least, my package.json and bower.json..

{
  "name": "ember-homepage",
  "version": "0.0.0",
  "description": "Small description for ember-homepage goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.10.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.4.2",
    "broccoli-clean-css": "1.1.0",
    "ember-ajax": "^2.0.1",
    "ember-browserify": "1.1.12",
    "ember-cli": "2.7.0",
    "ember-cli-app-version": "^1.0.0",
    "ember-cli-autoprefixer": "0.6.0",
    "ember-cli-babel": "^5.1.6",
    "ember-cli-dependency-checker": "^1.2.0",
    "ember-cli-deploy": "1.0.0-beta.1",
    "ember-cli-deploy-ftp": "^1.0.0",
    "ember-cli-deploy-gzip": "0.2.3",
    "ember-cli-foundation-6-sass": "0.0.13",
    "ember-cli-htmlbars": "^1.0.3",
    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
    "ember-cli-inject-live-reload": "^1.4.0",
    "ember-cli-jshint": "^1.0.0",
    "ember-cli-qunit": "^2.0.0",
    "ember-cli-release": "^0.2.9",
    "ember-cli-sass": "5.5.1",
    "ember-cli-test-loader": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "^2.7.0",
    "ember-export-application-global": "^1.0.5",
    "ember-hammertime": "1.0.3",
    "ember-load-initializers": "^0.5.1",
    "ember-normalize": "1.0.0",
    "ember-redux": "1.5.3",
    "ember-resolver": "^2.0.3",
    "ember-suave": "4.0.0",
    "ember-truth-helpers": "1.2.0",
    "liquid-fire": "0.25.0",
    "loader.js": "^4.0.1",
    "normalize.css": "4.1.1",
    "redux": "3.6.0",
    "redux-thunk": "2.1.0"
  }
}

bower.json:

{
  "name": "ember-homepage",
  "dependencies": {
    "ember": "~2.7.0",
    "ember-cli-shims": "0.1.1",
    "ember-qunit-notifications": "0.1.0",
    "hammer-time": "1.0.0",
    "foundation-sites": "^6.2.1"
  }
}

I should be updating ember sometime this week and will try to update this thread

@devinrhode2 devinrhode2 changed the title causes build error with ember-cli-deploy Causes build error with ember-cli-deploy Oct 5, 2016
@devinrhode2
Copy link
Author

Funny thing is it worked at least on the first deploy, so I got the assets uploaded to the server.
I think broccoli-asset-rev does something stupid and renames my favicon.png tho. Hmm..

@fiddler
Copy link

fiddler commented Feb 22, 2017

Ran into this same problem when deploying to Heroku. This is a bit late, but I fixed it by configuring asset-rev to ignore favicon in ember-cli-build.js.

  var app = new EmberApp(defaults, {
    // Add options here
    fingerprint: {
      exclude: ['apple-touch-icon', 'favicon', 'mstile']
    }
  });

@brancusi
Copy link

Thanks @fiddler, that worked

@davewasmer
Copy link
Owner

This should be fixed in the latest release (the addon should automatically add those exclusions to the fingerprinting options). Feel free to drop a note if not, and I'll reopen.

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

4 participants