ember-table icon indicating copy to clipboard operation
ember-table copied to clipboard

rollup error upon fresh install of ember-table in yarn ember app

Open efx opened this issue 6 years ago • 2 comments

I created a new ember application with yarn as the default package manager, and saw a rollup error after ember install ember-table:

/v/f/r/1/T $ ember new --no-welcome --yarn true ember-table-testing-2
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
Yarn: Installed dependencies
/v/f/r/1/T $ cd ember-table-testing-2/
/v/f/r/1/T/ember-table-testing-2 $ ember install ember-table
Yarn: Installed ember-table
Cannot find module 'broccoli-rollup'


Stack Trace and Error Report: /var/folders/r6/1tb0c_rn22xdhm39d62y6rfh0000gn/T/error.dump.5218e6133ff99e39ad0b0a42267bff3a.log
An error occurred in the constructor for ember-table at /private/var/folders/r6/1tb0c_rn22xdhm39d62y6rfh0000gn/T/ember-table-testing-2/node_modules/ember-table

That log contains the stack which points to vertical-collection:


ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: MODULE_NOT_FOUND
  - codeFrame: [undefined]
  - errorMessage: Cannot find module 'broccoli-rollup'
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: Cannot find module 'broccoli-rollup'
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: Error: Cannot find module 'broccoli-rollup'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/private/var/folders/r6/1tb0c_rn22xdhm39d62y6rfh0000gn/T/ember-table-testing-2/node_modules/@html-next/vertical-collection/index.js:5:16)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

=================================================================================

Vertical collection does have broccoli-rollup specified in package.json's dependencies so I'm not sure why this fails.

steps to reproduce

  1. run ember new --no-welcome --yarn true ember-table-testing-2
  2. ember install ember-table

environment

$ ember --version && yarn --version && node --version
ember-cli: 3.11.0
node: 10.16.0
os: darwin x64
1.17.3
v10.16.0

efx avatar Jul 23 '19 17:07 efx

@efx Thanks for a clear description of the error.

I've tested this locally with a few different node versions and ember-cli versions and it seems to happen only with ember-cli 3.10 or 3.11. ember-cli at version 3.9.0 worked ok.

bantic avatar Jul 29 '19 16:07 bantic

I looked into it a little further and discovered that in some of my attempts that failed locally the missing package was broccoli-asset-rev.

Every time I encountered it, a second attempt at ember install ember-table worked fine. I wonder if it may be a race condition with ember-cli's ember install internals...

bantic avatar Jul 29 '19 16:07 bantic