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

Build fails with a clean install on a brand new app #1069

Closed
mansona opened this issue Feb 26, 2019 · 19 comments
Closed

Build fails with a clean install on a brand new app #1069

mansona opened this issue Feb 26, 2019 · 19 comments

Comments

@mansona
Copy link
Collaborator

mansona commented Feb 26, 2019

Morning folks 👋

I've just done a clean install on a brand new app with the following steps:

npm init ember-app new-app
cd new-app
ember install ember-paper
npm start

And I get the following error:

ENOENT: no such file or directory, lstat '/Users/mansona/git/projects/new-app/node_modules/angular-material-source/src/core/services/layout/layout.scss'

Having a look at the folder node_modules/angular-material-source/src it looks like it is missing the core folder altogether 🤔 Maybe this is as a result of version drift of that dependency?

@miguelcobain
Copy link
Owner

Hi @mansona 👋

I just did

ember new paper-test
cd paper-test
ember install ember-paper
ember s

and all went smoothly here.

Not sure what happened during your angular-material-source installation, but it definitely should have the needed files in there!

@mansona
Copy link
Collaborator Author

mansona commented Feb 26, 2019

I don't know what to tell you 😂 I just ran the exact same steps and it failed again!

Here are my versions:

➜  temp ember -v
ember-cli: 3.7.1
node: 10.12.0
os: darwin x64
➜  temp npm -v
6.8.0

and here is the output of those exact commands with no gaps between:

➜  temp ember new paper-test
installing app
  create .editorconfig
  create .ember-cli
  create .eslintignore
  create .eslintrc.js
  create .template-lintrc.js
  create .travis.yml
  create .watchmanconfig
  create README.md
  create app/app.js
  create app/components/.gitkeep
  create app/controllers/.gitkeep
  create app/helpers/.gitkeep
  create app/index.html
  create app/models/.gitkeep
  create app/resolver.js
  create app/router.js
  create app/routes/.gitkeep
  create app/styles/app.css
  create app/templates/application.hbs
  create app/templates/components/.gitkeep
  create config/environment.js
  create config/optional-features.json
  create config/targets.js
  create ember-cli-build.js
  create .gitignore
  create package.json
  create public/robots.txt
  create testem.js
  create tests/helpers/.gitkeep
  create tests/index.html
  create tests/integration/.gitkeep
  create tests/test-helper.js
  create tests/unit/.gitkeep
  create vendor/.gitkeep
npm: Installed dependencies
Successfully initialized git.
➜  temp cd paper-test
➜  paper-test git:(master) ember install ember-paper
npm: Installed ember-paper
installing ember-paper
  create app/styles/app.scss
  install addon ember-cli-sass
npm: Installed ember-cli-sass
installing ember-cli-sass
  install package sass
npm: Installed sass
Installed addon package.
Installed addon package.
➜  paper-test git:(master) ✗ ember s
Build Error (Funnel)

ENOENT: no such file or directory, lstat '/Users/mansona/temp/paper-test/node_modules/angular-material-source/src/core/services/layout/layout.scss'


Stack Trace and Error Report: /var/folders/r5/bw5frvnn5k794hk62w3vp7km0000gn/T/error.dump.53d0f85e1cc8372088e09e85a28459ac.log

maybe you can share your versions and I can see if it's something specific to my environment 🤔

@panthony
Copy link
Contributor

panthony commented Feb 27, 2019

@miguelcobain Weird, I have an automatic deployment that started failing with the exact same error.

And I'm using my fork of ember-paper from beta.20.

Same as @mansona , the core folder is missing

@panthony
Copy link
Contributor

@mansona @miguelcobain Probably a cache related issue of some sort.

Doing npm install --cache /tmp/empty-cache fixed it for me.

@mansona
Copy link
Collaborator Author

mansona commented Feb 27, 2019

hmm 🤔 that's interesting @panthony I tried to clear my cache and try again but it didn't work. I also tried your method of npm install --cache /tmp/empty-cache and it also didn't work.

I tried it really quick with yarn and it seems to be working 😫 I wonder if we're in a bit of a grey area because we're really heavily depending on a git dependency and not using what's actually packaged in the registry?

@panthony
Copy link
Contributor

I actually did npm ci --cache /tmp/empty-cache, in case it works better with ci but I would not see why.

I also looked for an .npmignore but could not find any..

@mansona
Copy link
Collaborator Author

mansona commented Feb 27, 2019

@panthony yea I was thinking that it was something to do with a .npmignore file or maybe a files: [] definition in the package.json but I couldn't find anything that might be causing this 🤔

@panthony
Copy link
Contributor

panthony commented Feb 28, 2019

@mansona Got the same error on a different machine and directly did npm ci --cache /tmp/empty-cache but this time it didn't work.

It must have been the combinaison of different attempts at fixing it.

Weird.

edit:

Apparently:

npm cache clean --force
npm ci --cache=/tmp/empty-cache

Did the trick...

edit2:

But it fails again at the next attempt...

What a nightmare.

@panthony
Copy link
Contributor

Fun fact, if I execute npm prune, a single package gets removed, angular-material-source, ...

@panthony
Copy link
Contributor

panthony commented Feb 28, 2019

@miguelcobain Just so you know, on the machines where I have the issue, this:

ember new paper-test
cd paper-test
ember install ember-paper
ember s

does not work.

Whereas until a few days ago everything was working.

I did not change my package.json nor node or npm ...

Can't figure out what is happening.

edit:

Actually, even this fails:

mkdir test
cd test
npm install angular/material#v1.1.10

The "core" directory is missing

@miguelcobain
Copy link
Owner

A git dependency is definitely not the best.

Seems like angular material folks won't publish the source files to npm: angular/material#10762

Can someone do that? Or is there a better option? git submodules? Copy pasting? :/

@mansona
Copy link
Collaborator Author

mansona commented Feb 28, 2019

@miguelcobain if they won't publish it then I don't see what is wrong with us publishing it 🤔

it will essentially be a "soft fork" that literally only changes the name 😂 I'm alright with doing the work if I can help 😄

@panthony
Copy link
Contributor

panthony commented Mar 1, 2019

@miguelcobain FYI this morning I had no issue when I deployed...

This is a true cosmic ray issue.

I'm sure someone somewhere broke something impacting random people around the world and silently fixed it without saying anything.

Wouldn't be the first time actually.

@abobwhite
Copy link

abobwhite commented Mar 1, 2019

I started having this problem 2 days ago and I have done every trick in the book to get this to work with removing node_modules/tmp several times, trying to reinstall the ember-paper addon, etc. I didn't change my dependencies at all. The error only shows up with ember serve, ember build has no error. I have spent too many hours trying to get this working when I changed nothing :/

@mansona
Copy link
Collaborator Author

mansona commented Mar 1, 2019

@panthony I think the fact that we are working with GitHub dependencies means that we are always going to be susceptible to "changing implementations" in every aspect of this 🙈

The only real way to fix this is to actually deploy the material-source to npm because we pack things into a tar file and that tar is what is on npm 👍

Like I said I'm happy to help with that @miguelcobain if it's something you're ok with us doing

@abobwhite
Copy link

Does anyone have a workaround? I can't do any work right now :/

@miguelcobain
Copy link
Owner

Can you guys try 1.0.0-beta.24?
This should be fixed.

Ember-paper now depends on angular-material-styles npm package. This package only contains scss styles.

@abobwhite
Copy link

Hey @miguelcobain thanks for tackling that change so quickly! I just tried 1.0.0-beta24 it and it seems to work well :)

@mansona
Copy link
Collaborator Author

mansona commented Mar 3, 2019

Thanks a million @miguelcobain 🎉 I've gone through my steps to reproduce and the issue is gone! 😍

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