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

Concat wants a folder for an addon, but one doesn't exist? #139

Open
NullVoxPopuli opened this issue Oct 5, 2018 · 5 comments
Open

Concat wants a folder for an addon, but one doesn't exist? #139

NullVoxPopuli opened this issue Oct 5, 2018 · 5 comments

Comments

@NullVoxPopuli
Copy link

NullVoxPopuli commented Oct 5, 2018

Just testing out the updates: ember-cli/ember-cli#8091

in package.json:

+    "ember-cli": "github:NullVoxPopuli/ember-cli#1f54b505f09fd7718cf6d4486238a8f91f9e0a58",

Got this error:

$ yarn broccoli-concat-analyser ./concat-stats-for
$ /home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/.bin/broccoli-concat-analyser ./concat-stats-for
⠙ processing...{ Error: ENOENT: no such file or directory, open '/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/concat-stats-for/1-ember-cli-notifications.css/ember-cli-notifications/styles/addon.css'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at fileNames.forEach (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/broccoli-concat-analyser/lib/summarize.js:31:63)
    at Array.forEach (<anonymous>)
    at Function.summarize (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/broccoli-concat-analyser/lib/summarize.js:31:13)
    at process.<anonymous> (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/workerpool/lib/worker.js:76:27)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/concat-stats-for/1-ember-cli-notifications.css/ember-cli-notifications/styles/addon.css' }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
me@Tyche ~/Development/NullVoxPopuli/emberclear/packages/frontend
⬡ v8.11.3  (code-quality-checking) $ la concat-stats-for/
total 72K
drwxr-xr-x  5 me me 4.0K Oct  5 14:38 .
drwxr-xr-x 14 me me 4.0K Oct  5 14:39 ..
drwxr-xr-x 10 me me 4.0K Oct  5 14:38 1-emberclear.js
-rw-r--r--  1 me me  16K Oct  5 14:38 1-emberclear.js.json
-rw-r--r--  1 me me  282 Oct  5 14:38 1-ember-cli-notifications.css.json
-rw-r--r--  1 me me 6.6K Oct  5 14:38 2-emberclear-fastboot.js.json
drwxr-xr-x 10 me me 4.0K Oct  5 14:38 2-vendor.js
-rw-r--r--  1 me me  20K Oct  5 14:38 2-vendor.js.json
drwxr-xr-x 10 me me 4.0K Oct  5 14:38 3-vendor.css
-rw-r--r--  1 me me  267 Oct  5 14:38 3-vendor.css.json
@NullVoxPopuli
Copy link
Author

concat-stats-for/3-vendor.css/addon-tree-output/

ember-cli-notifications/
 - components/
 - services/
 - styles/
 - templates/
ember-cli-notifications.css

@rwjblue
Copy link
Member

rwjblue commented Oct 5, 2018

Steps to reproduce?

@NullVoxPopuli
Copy link
Author

this should do it:

git clone [email protected]:NullVoxPopuli/emberclear.git
cd emberclear/packages/frontend
git checkout broccoli-concat-tests
yarn clean && yarn && yarn analyze

though, when I just ran this again, I got a different error / missing file:

$ yarn broccoli-concat-analyser ./concat-stats-for
$ /home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/.bin/broccoli-concat-analyser ./concat-stats-for
⠙ processing...{ Error: ENOENT: no such file or directory, open '/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/concat-stats-for/2-emberclear-fastboot.js/emberclear/initializers/ajax.js'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at fileNames.forEach (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/broccoli-concat-analyser/lib/summarize.js:31:63)
    at Array.forEach (<anonymous>)
    at Function.summarize (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/broccoli-concat-analyser/lib/summarize.js:31:13)
    at process.<anonymous> (/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/node_modules/workerpool/lib/worker.js:76:27)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/me/Development/NullVoxPopuli/emberclear/packages/frontend/concat-stats-for/2-emberclear-fastboot.js/emberclear/initializers/ajax.js' }

@NullVoxPopuli
Copy link
Author

I've come up with this script in the mean time:

#!/bin/bash

R="\e[31m"
Y="\e[33m"
N="\e[0m"

yarn build:production:analyze
# =>  CONCAT_STATS=true yarn build:production
# => PREMBER=true EXPERIMENTAL_RENDER_MODE_SERIALIZE=true yarn build --environment production && sed -i -e 's/{{ROOT_URL}}/\//g' dist/index.html
# => yarn ember build --environment production
# => EMBER_CLI_BROCCOLI_2=true EMBER_CLI_SYSTEM_TEMP=true EMBER_CLI_MODULE_UNIFICATION=true node_modules/.bin/ember build --environment production


# rm files that do not have corresponding folders
for filename in ./concat-stats-for/*; do
  extension=${filename: -5}

  if [ $extension == ".json" ]; then
    folderName="${filename//$extension/}"

    if [ ! -d "$folderName" ]; then
      echo -e "\n${Y}$folderName ${R} does not exist..."
      echo -e "\tDeleting ${Y}$filename${N}\n"

      rm $filename
    fi
  fi
done

# begin analysis
yarn bundle-analyze
# => yarn broccoli-concat-analyser ./concat-stats-for
# => node_modules/.bin/broccoli-concat-analyser ./concat-stats-for

# copy to public folder for deployment
cp ./concat-stats-for/index.html ./public/bundle.html

it seems that the extra json files that are generated aren't useful / are already included in vendor

@stefanpenner
Copy link
Collaborator

@NullVoxPopuli is this still an issue?

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