%AppData% causes: Error parsing appveyor.yml: While scanning for the next token, find character that cannot start any token
As a follow-up to node.js connectivity issues I started implementing the build cache.
Using just plain directory names seems to work:
cache:
- c:\Users\appveyor\.node-gyp
- c:\Users\appveyor\AppData\Roaming\npm-cache
Then I follow the build cache guide
and use environmental variable (%AppData%) instead
like this:
cache:
- c:\Users\appveyor\.node-gyp
- %AppData%\npm-cache
broken appveyor.yml file - diff to previous
The build fails immediately with a message (wrapped here):
Error parsing appveyor.yml:
(Line: 13, Col: 5, Idx: 176) - (Line: 13, Col: 6, Idx: 177):
While scanning for the next token,
find character that cannot start any token.
Is YAML parser having trouble with the % character?
Am I doing something wrong?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 23 Aug, 2015 10:09 AM
Yes, the value starting from
%should be in quotes:2 Posted by saper on 23 Aug, 2015 10:46 AM
Strange, with quotes added I do not seem to get
Restoring...andSaving...messages for the%AppData%\npm-cachein the build log.Support Staff 3 Posted by Feodor Fitsner on 23 Aug, 2015 10:50 AM
I see: https://ci.appveyor.com/project/saper/node-sass/build/11#L334
Support Staff 4 Posted by Feodor Fitsner on 23 Aug, 2015 10:51 AM
Also, I've moved your account to a faster environment. Next time you run a build the cache will be re-created.
5 Posted by saper on 23 Aug, 2015 11:23 AM
Thank you. Seems to work perfectly. And blazing fast!
saper closed this discussion on 23 Aug, 2015 11:23 AM.