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

ember-try fails with default addon app + ember-cli-sass #126

Closed
blimmer opened this issue May 20, 2017 · 9 comments
Closed

ember-try fails with default addon app + ember-cli-sass #126

blimmer opened this issue May 20, 2017 · 9 comments

Comments

@blimmer
Copy link

blimmer commented May 20, 2017

With a brand new addon blueprint from ember-cli 2.13.2, ember-try fails with this exception:

ENOENT: no such file or directory, scandir '/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/vendor'
Error: ENOENT: no such file or directory, scandir '/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:952:18)
    at Object.getInstalledBinaries (/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/lib/extensions.js:124:13)
    at foundBinariesList (/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/home/travis/build/blimmer/ember-cli-example-app-for-github/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)

I noticed this on my project, ember-appboy with this PR: blimmer/ember-appboy#42

So I tried it with the default blueprint and experienced the same issue.

Proof of bad build:

https://travis-ci.org/blimmer/ember-cli-example-app-for-github/builds/234425340

Code:
https://github.com/blimmer/ember-cli-example-app-for-github/tree/bug/show-issue-with-nodesass

blimmer/ember-cli-example-app-for-github@e4dad0a

Version info:

 /tmp/ember-try-test   bug/show-issue-with-nodesass  ember version --verbose && npm --version && yarn --version
ember-cli: 2.13.2
http_parser: 2.7.0
node: 4.8.2
v8: 4.5.103.46
uv: 1.9.1
zlib: 1.2.11
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2k
os: darwin x64
4.6.1
0.24.5

Repro steps:

ember addon foo-bar --yarn true
cd foo-bar
ember install ember-cli-sass
# create tests/dummy/app/styles/app.scss with any content
# push to travis so it'll build
@blimmer
Copy link
Author

blimmer commented May 21, 2017

Also, please let me know if this issue should be opened within the ember-cli project. It seemed like maybe an issue with ember-try, but let me know if it belongs in that repo instead.

@rwjblue
Copy link
Member

rwjblue commented May 21, 2017

Hmm. Seems like an issue with node-sass and/or ember-cli-sass (haven't really done much debugging on it yet though).

@kategengler
Copy link
Member

@blimmer What happens if you just run ember test instead of running through ember-try?

@blimmer
Copy link
Author

blimmer commented May 23, 2017

@kategengler
Copy link
Member

Still looking into this, but for reference:
That error is seen if initial install is done with yarn install --no-lockfile
It is not seen if install is done with the lockfile yarn install

@blimmer
Copy link
Author

blimmer commented May 29, 2017

Strange, yes I'm seeing the same thing. Repro steps if others are curious:

git clone -b bug/show-issue-with-nodesass https://github.com/blimmer/ember-cli-example-app-for-github.git
cd ember-cli-example-app-for-github
yarn install --no-lockfile
DEBUG=ember-try* node_modules/.bin/ember try:one ember-lts-2.4 test --skip-cleanup
  ember-try:commands:try-one Scenario argument: ember-lts-2.4 +0ms
  ember-try:commands:try-one Command options:
  ember-try:commands:try-one  { skipCleanup: true,
  configPath: 'config/ember-try.js',
  checkForUpdates: false,
  disableAnalytics: false } +1ms
  ember-try:commands:try-one Command specified on command line:  +3ms
  ember-try:commands:try-one Config: {"scenarios":[{"name":"ember-lts-2.4","bower":{"dependencies":{"ember":"components/ember#lts-2-4"},"resolutions":{"ember":"lts-2-4"}},"npm":{"devDependencies":{"ember-source":null}}},{"name":"ember-lts-2.8","bower":{"dependencies":{"ember":"components/ember#lts-2-8"},"resolutions":{"ember":"lts-2-8"}},"npm":{"devDependencies":{"ember-source":null}}},{"name":"ember-release","bower":{"dependencies":{"ember":"components/ember#release"},"resolutions":{"ember":"release"}},"npm":{"devDependencies":{"ember-source":null}}},{"name":"ember-beta","bower":{"dependencies":{"ember":"components/ember#beta"},"resolutions":{"ember":"beta"}},"npm":{"devDependencies":{"ember-source":null}}},{"name":"ember-canary","bower":{"dependencies":{"ember":"components/ember#canary"},"resolutions":{"ember":"canary"}},"npm":{"devDependencies":{"ember-source":null}}},{"name":"ember-default","npm":{"devDependencies":{}}}]} +1ms
  ember-try:dependency-manager-adapter:npm Using yarn as dependency manager +424ms
  ember-try:task:try-each DependencyManagerAdapters: npm,bower +0ms
  ember-try:dependency-manager-adapter:npm Backing up package.json and node_modules +1ms
  ember-try:task:try-each Scenario Manager setup +5s
  ember-try:dependency-manager-adapter:npm Changing to dependency set: {"devDependencies":{"ember-source":null}} +2ms
  ember-try:dependency-manager-adapter:npm Write package.json with:
  ember-try:dependency-manager-adapter:npm  {"name":"ember-try-test","version":"0.0.0","description":"The default blueprint for ember-cli addons.","keywords":["ember-addon"],"license":"MIT","author":"","directories":{"doc":"doc","test":"tests"},"repository":"","scripts":{"build":"ember build","start":"ember server","test":"ember try:each"},"dependencies":{"ember-cli-babel":"^6.0.0"},"devDependencies":{"broccoli-asset-rev":"^2.4.5","ember-ajax":"^3.0.0","ember-cli":"2.13.2","ember-cli-dependency-checker":"^1.3.0","ember-cli-eslint":"^3.0.0","ember-cli-htmlbars":"^1.1.1","ember-cli-htmlbars-inline-precompile":"^0.4.0","ember-cli-inject-live-reload":"^1.4.1","ember-cli-qunit":"^4.0.0","ember-cli-sass":"^6.1.3","ember-cli-shims":"^1.1.0","ember-cli-sri":"^2.1.0","ember-cli-uglify":"^1.2.0","ember-disable-prototype-extensions":"^1.1.0","ember-export-application-global":"^2.0.0","ember-load-initializers":"^1.0.0","ember-resolver":"^4.0.0","ember-welcome-page":"^3.0.0","loader.js":"^4.2.3"},"engines":{"node":">= 4"},"ember-addon":{"configPath":"tests/dummy/config"}} +0ms
  ember-try:dependency-manager-adapter:npm Run npm install with options  +1ms
  ember-try:utils:run spawned with  sh [ '-c', 'yarn install --no-lockfile' ] { cwd: '/Users/blimmer/code/ember-cli-example-app-for-github',
  stdio: 'inherit' } +7ms
yarn install v0.24.6
[1/4] 🔍  Resolving packages...
warning ember-disable-prototype-extensions > ember-cli-babel > broccoli-babel-transpiler > babel-core > [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
✨  Done in 10.59s.
  ember-try:utils:run Process exited 0 +11s
  ember-try:dependency-manager-adapter:npm Switched to dependencies:
  ember-try:dependency-manager-adapter:npm  [ { name: 'ember-source',
    versionExpected: null,
    versionSeen: null,
    packageManager: 'yarn' } ] +1ms
  ember-try:dependency-manager-adapter:bower Changing to dependency set: {"dependencies":{"ember":"components/ember#lts-2-4"},"resolutions":{"ember":"lts-2-4"}} +1ms
  ember-try:dependency-manager-adapter:bower Write bower.json with:
  ember-try:dependency-manager-adapter:bower  {"name":"ember-try-placeholder","dependencies":{"ember":"components/ember#lts-2-4"},"resolutions":{"ember":"lts-2-4"}} +0ms
  ember-try:dependency-manager-adapter:bower Remove bower_components +5ms
  ember-try:dependency-manager-adapter:bower Bower not found +10ms
  ember-try:dependency-manager-adapter:bower Installing bower via npm +0ms
  ember-try:utils:run spawned with  sh [ '-c', 'npm install bower@^1.3.12' ] { cwd: '/Users/blimmer/code/ember-cli-example-app-for-github',
  stdio: 'inherit' } +5ms
npm WARN deprecated [email protected]: ..psst! While Bower is maintained, we recommend yarn and webpack for new front-end projects! Please read our blog for more.
[email protected] /Users/blimmer/code/ember-cli-example-app-for-github
└── [email protected]

npm WARN [email protected] No repository field.
  ember-try:utils:run Process exited 0 +44s
  ember-try:dependency-manager-adapter:bower Run bower install using bower at /Users/blimmer/code/ember-cli-example-app-for-github/node_modules/bower/bin/bower +3ms
  ember-try:utils:run spawned with  sh [ '-c',
  'node /Users/blimmer/code/ember-cli-example-app-for-github/node_modules/bower/bin/bower install --config.interactive=false' ] { cwd: '/Users/blimmer/code/ember-cli-example-app-for-github',
  stdio: 'inherit' } +2ms
bower ember#lts-2-4         not-cached https://github.com/components/ember.git#lts-2-4
bower ember#lts-2-4            resolve https://github.com/components/ember.git#lts-2-4
bower ember#lts-2-4           download https://github.com/components/ember/archive/lts-2-4.tar.gz
bower ember#lts-2-4            extract archive.tar.gz
bower ember#lts-2-4       invalid-meta for:/var/folders/p0/gwxdn5wd1pl7b7yljjg2g1kc0000gn/T/blimmer/bower/98e89bbbb4878ec0cc7833f0f91276c2-34894-mekHHK/bower.json
bower ember#lts-2-4       invalid-meta The "main" field has to contain only 1 file per filetype; found multiple .js files: ["./ember.debug.js","./ember-template-compiler.js"]
bower ember#lts-2-4           resolved https://github.com/components/ember.git#ea11df0ad7
bower jquery#>= 1.7.0 < 3.0.0   cached https://github.com/jquery/jquery-dist.git#2.2.4
bower jquery#>= 1.7.0 < 3.0.0 validate 2.2.4 against https://github.com/jquery/jquery-dist.git#>= 1.7.0 < 3.0.0
bower ember           extra-resolution Unnecessary resolution: ember#lts-2-4
bower ember#lts-2-4            install ember#ea11df0ad7
bower jquery#>= 1.7.0 < 3.0.0  install jquery#2.2.4

ember#ea11df0ad7 bower_components/ember
└── jquery#2.2.4

jquery#2.2.4 bower_components/jquery
  ember-try:utils:run Process exited 0 +3s
  ember-try:dependency-manager-adapter:bower Switched to dependencies:
  ember-try:dependency-manager-adapter:bower  [ { name: 'ember',
    versionExpected: 'components/ember#lts-2-4',
    versionSeen: '2.4.6',
    packageManager: 'bower' } ] +1ms

=== Scenario: ember-lts-2.4 ====================================================

  ember-try:task:try-each With:
  ember-try:task:try-each  { scenario: 'ember-lts-2.4',
  allowedToFail: false,
  dependencyState:
   [ { name: 'ember-source',
       versionExpected: null,
       versionSeen: null,
       packageManager: 'yarn' },
     { name: 'ember',
       versionExpected: 'components/ember#lts-2-4',
       versionSeen: '2.4.6',
       packageManager: 'bower' } ],
  command: 'ember test' } +14ms
  ember-try:utils:run spawned with  sh [ '-c',
  'node /Users/blimmer/code/ember-cli-example-app-for-github/node_modules/ember-cli/bin/ember test' ] { cwd: '/Users/blimmer/code/ember-cli-example-app-for-github',
  stdio: 'inherit' } +5ms
ENOENT: no such file or directory, scandir '/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/vendor'
Error: ENOENT: no such file or directory, scandir '/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:808:18)
    at Object.getInstalledBinaries (/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/lib/extensions.js:124:13)
    at foundBinariesList (/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/lib/errors.js:45:5)
    at module.exports (/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/lib/binding.js:15:30)
    at Object.<anonymous> (/Users/blimmer/code/ember-cli-example-app-for-github/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
  ember-try:utils:run Process exited 1 +841ms

Result: false
---

  ember-try:task:try-each Cleanup +1ms
  ember-try:task:try-each Skip ScenarioManager cleanup +0ms
  ember-try:task:try-each Output results +0ms

------ RESULTS ------

Scenario ember-lts-2.4: FAIL
Command run: ember test
┌────────────────────┬────────────────────┬──────────────────────────────┬──────────┐
│ Dependency         │ Expected           │ Used                         │ Type     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember-source       │ Not Installed      │ Not Installed                │ yarn     │
├────────────────────┼────────────────────┼──────────────────────────────┼──────────┤
│ ember              │ components/ember#… │ 2.4.6                        │ bower    │
└────────────────────┴────────────────────┴──────────────────────────────┴──────────┘


1 scenarios failed
0 scenarios succeeded
1 scenarios run
  ember-try:task:try-each Exit 1 +22ms

@blimmer
Copy link
Author

blimmer commented May 29, 2017

I think this is an upstream issue with yarn: yarnpkg/yarn#3485

@kategengler
Copy link
Member

Looks like a fix has been merged in yarn.

@blimmer
Copy link
Author

blimmer commented Jun 25, 2017

Confirmed that 0.27.0 fixes the issue. To fix the issue, I had to explicitly install that version in CI until this is a stable release.

blimmer/ember-appboy@b0ee2c6

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

3 participants