Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Can't deploy static assets #77

Closed
EwanValentine opened this issue Jun 3, 2017 · 2 comments
Closed

Can't deploy static assets #77

EwanValentine opened this issue Jun 3, 2017 · 2 comments

Comments

@EwanValentine
Copy link

I get the following error when I attempt to run $ heroku static:deploy:

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:1146:7)
    at setopts (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/glob/common.js:97:21)
    at new GlobSync (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/glob/sync.js:40:3)
    at Function.globSync [as sync] (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/glob/sync.js:26:10)
    at /Users/ewanvalentine/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:62:17
    at /Users/ewanvalentine/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:30:19
    at Array.forEach (native)
    at processPatterns (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:24:23)
    at Object.file.expand (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:60:17)
    at Object.file.expandMapping (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:94:8)
    at /Users/ewanvalentine/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:159:19
    at arrayMap (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/lodash/lodash.js:660:23)
    at Function.map (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/lodash/lodash.js:9571:14)
    at interceptor (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/lodash/lodash.js:16970:35)
    at thru (/Users/ewanvalentine/.local/share/heroku/plugins/node_modules/lodash/lodash.js:8812:14) 'error'
(node:9671) DeprecationWarning: Archiver.bulk() deprecated since 0.21.0

I'm using the node build pack, and this build pack. I'm attempting to deploy a static html file, js and a css file, in a subdirectory dist. Here's the static.json...

{
  "root": "public",
  "clean_urls": false,
  "routes": {
    "/**": "index.html"
  }
}
@EwanValentine
Copy link
Author

This is a bug in a dependency (archiver) in node -v 8. Using node -v 7 solves this.

@sbauch
Copy link

sbauch commented Jun 12, 2017

I'm getting the same error and can't seem to work around it using node 7.

I'm using NVM to manage my node environments, so maybe I'm not actually using 7 globally / for the heroku plugins?

$ which node
/Users/sbauch/.nvm/versions/node/v7.10.0/bin/node

$ heroku plugins:install heroku-cli-static
Installing plugin heroku-cli-static... done

$ heroku static:deploy
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:1146:7)
    at setopts (/Users/sbauch/.local/share/heroku/plugins/node_modules/glob/common.js:97:21)
    at new GlobSync (/Users/sbauch/.local/share/heroku/plugins/node_modules/glob/sync.js:40:3)
    at Function.globSync [as sync] (/Users/sbauch/.local/share/heroku/plugins/node_modules/glob/sync.js:26:10)
    at /Users/sbauch/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:62:17
    at /Users/sbauch/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:30:19
    at Array.forEach (native)
    at processPatterns (/Users/sbauch/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:24:23)
    at Object.file.expand (/Users/sbauch/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:60:17)
    at Object.file.expandMapping (/Users/sbauch/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:94:8)
    at /Users/sbauch/.local/share/heroku/plugins/node_modules/archiver-utils/file.js:159:19
    at arrayMap (/Users/sbauch/.local/share/heroku/plugins/node_modules/lodash/lodash.js:660:23)
    at Function.map (/Users/sbauch/.local/share/heroku/plugins/node_modules/lodash/lodash.js:9571:14)
    at interceptor (/Users/sbauch/.local/share/heroku/plugins/node_modules/lodash/lodash.js:16970:35)
    at thru (/Users/sbauch/.local/share/heroku/plugins/node_modules/lodash/lodash.js:8812:14) 'error'
(node:18779) DeprecationWarning: Archiver.bulk() deprecated since 0.21.0

Maybe this is better for stack overflow, but any insight would be helpful!

I'm also seeing this issue over at archiver, which makes it sound like node 8.0.1 should be working now as well?

archiverjs/node-archiver#236

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

2 participants