-
Notifications
You must be signed in to change notification settings - Fork 150
yo polymer:seed error. "AssertionError: Trying to copy from a source that does not exist" #240
Comments
@RossRothenstine What version of the generator are you using, can you try installing the latest version of the generator Thanks 🎇 |
Currently using 1.2.4, rolled back to 1.2.1 and it worked fine. |
ok so to be clear 1.2.4 is giving you issues then? I am fairly confident we resolved the issue with the 1.2.3 release with 1.2.4... if not that is disconcerting |
Yes. I attempted the latest, v1.2.3 and v1.2.2. Was only successful at running the seed generator on v1.2.1. I'm not 100% confident in my setup, seeing how its a work issued Mac with some corporate biz installed on it. I would like to see if any one else can replicate it first. |
@RossRothenstine mind running
|
Sure thing mate. The below is after a fresh npm install of the latest version.
Then, after an uninstall and reinstall of version v1.2.1. (using "npm install -g generator-polymer@v1.2.1")
If it's worth anything, here is an ls of my directory after having ran v1.2.1.
|
wow, very confusing, well thanks for the info |
FWIW I freshly installed npm, yo, bower, and generator-polymer@1.2.4 on my Windows 10 home machine and got similar output.
|
(╯°□°)╯︵ ┻━┻ kk I will get to this when a have a spare 🕐 |
This diff may be of some use to you. I was able to get this working locally by changing the if statement to check the template path for the .npmignore. diff --git a/seed/index.js b/seed/index.js
index af603e4..0dcec88 100644
--- a/seed/index.js
+++ b/seed/index.js
@@ -116,7 +116,7 @@ module.exports = yeoman.generators.Base.extend({
// Handle bug where npm has renamed .gitignore to .npmignore
// https://github.com/npm/npm/issues/3763
- if (this.fs.exists('.npmignore')) {
+ if (this.fs.exists(this.templatePath('.npmignore'))) {
this.fs.copy(
this.templatePath('.npmignore'),
this.destinationPath('.gitignore') Regards |
🙇 thx @RossRothenstine I am sure it will be something like that :) -- I am mostly curious what broke it initially |
I'm seeing this on OSX ElCap as well. I'm on node
|
Having the same issue with the same error message. I am using a codeanywhere on a node virtual server. |
Ok so all fixed @RossRothenstine Basically what was happening is when we were bundling up the seed elements, npm was trying to be smart and renaming (all) our .gitignore files to .npmignore so the file was no longer there, This fix googlearchive/seed-element#69 Will make it so this error will not hit you. The reason why this was tricky to reproduce locally, was because the npm renaming behavior only happens on publish thus when deving locally it was mystifying! Onto 1.2.5 🎇 --- Thanks for all of the reports everyone and the excellent debugging work @RossRothenstine |
I think this may need further discussion, as I'm still seeing the issue with v1.2.5. Could it be that the seed/templates/seed-element submodule is at the wrong revision? |
You are correct, I am a bit confused as to how I got this to work locally in the last pass 😿 Well I was not super crazy with the idea that adding a .npmignore would prevent this behavior even people on the team are confused by it :) npm/npm#7252 (comment) ok, alas I think we need to copy .npmignore and then rename it to a .gitignore |
Maybe commit the file as |
@samccone can we use the method outlined about of using fs.exists instead of fs.exists(this.templatePath) ? |
er sorry, I think I reversed my codes. It should check also, we may want to see if this happens in npm 4 vs 0.12. |
I checked my npm version (2.14.2) and node version (v4.0.0)
|
yeah this is not an issue with node 4 vs node .12 it is simply an issue with the renaming of gitignore on publish and explicitly trying to copy it, since it is being renamed to npmignore I think it all is related to I will work on a patch when I have a moment 🕐 |
Fixes #240 Regression introduced in f9e2d0d#diff-2018087f584c4398b5c3a23fc0e5f9dbR60
@samccone, thanks for the diligence and speed to fix this issue. +1 mate, I really appreciate it. |
Had the same issue on Ubuntu 14.04 in version 1.2.5. Rolled back to 1.2.1 and worked fine. |
I'm getting a stacktrace when I attempt to use the polymer:seed generator.
Versions:
OS: Mac Yosemite
node: v4.2.1
npm: 2.14.7
yo: 1.4.8
Listing of the directory generator-polymer/seed/templates/seed-element/
The text was updated successfully, but these errors were encountered: