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

Not compatible with @stencil/core@2.8.0 pkg #303

Closed
zanettin opened this issue Sep 3, 2021 · 4 comments
Closed

Not compatible with @stencil/core@2.8.0 pkg #303

zanettin opened this issue Sep 3, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@zanettin
Copy link

zanettin commented Sep 3, 2021

Describe the bug
When scaffolding a new lib and upgrading the nx workspace to latest i'll receive an error from the core lib, that the CI flag is not defined. It works as long as we use @stencil/core@2.6.0. After that version we'll get the above mentioned error. This is caused by this PR (ionic-team/stencil#2964) adding telemetry to the core. Within this PR they also changed the way passing around config values by introducing a StencilCLIConfig singleton (https://github.com/ionic-team/stencil/pull/2964/files#diff-dfa9baf011a9c38263c91af5d92745dd686bcc12a41d4974257c98da689589dfR24). Unfortunately the initialization of the singleton is just done within the run() fn and not within any specific fn like taskBuild() which (if i am not wrong) is called by your plugin directly. therefore the flags are always empty and the above mentioned error occurs. Quickly checked on my test app and the run() fn is never called atm but taskBuid() is. When execute any command on a "pure" stencil project, the run() fn is called and the store is initialized correctly.

EDIT:
just checked your package.json which has a pinned dep to @stencil/core@2.6.0 😄 guess that is the only reason why it's not working because the stencil CLI is still on 2.6.0, right? 😄

To Reproduce

  • create a new nx workspace
  • add a new stencil lib using this plugin
  • run nx migrate
  • run yarn
  • run nx migrate --run-migration
  • upgrade all stencil related pkgs to latest
  • run npx nx build <lib>

Expected behavior
the stencil config singleton is no longer empty and therefor the error is not thrown

Additional context
Thanks a lot for the time spent on this plugin 🙏
Pkg Versions i am using atm:

  "dependencies": {
    "document-register-element": "1.13.1",
    "lit": "^2.0.0-rc.3",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "tslib": "^2.0.0"
  },
  "devDependencies": {
    "@babel/core": "7.9.6",
    "@babel/preset-env": "7.9.6",
    "@babel/preset-react": "7.9.4",
    "@babel/preset-typescript": "7.9.0",
    "@nrwl/cli": "12.8.0",
    "@nrwl/cypress": "12.8.0",
    "@nrwl/eslint-plugin-nx": "12.8.0",
    "@nrwl/jest": "12.8.0",
    "@nrwl/react": "12.8.0",
    "@nrwl/tao": "12.8.0",
    "@nrwl/web": "^12.8.0",
    "@nrwl/workspace": "12.8.0",
    "@nxext/stencil": "^12.1.2",
    "@stencil/core": "2.8.0",
    "@stencil/react-output-target": "^0.0.12",
    "@testing-library/react": "11.2.5",
    "@types/jest": "26.0.8",
    "@types/node": "14.14.33",
    "@types/react": "17.0.3",
    "@types/react-dom": "17.0.3",
    "@typescript-eslint/eslint-plugin": "4.28.5",
    "@typescript-eslint/parser": "4.28.5",
    "babel-jest": "26.2.2",
    "cypress": "^5.5.0",
    "dotenv": "10.0.0",
    "eslint": "7.22.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsx-a11y": "6.4.1",
    "eslint-plugin-react": "7.23.1",
    "eslint-plugin-react-hooks": "4.2.0",
    "jest": "26.6.3",
    "prettier": "2.3.2",
    "ts-jest": "26.5.6",
    "ts-node": "9.1.1",
    "tslint": "6.1.3",
    "typescript": "4.3.5"
  }
}
@zanettin zanettin added the bug Something isn't working label Sep 3, 2021
@DominikPieper
Copy link
Member

Hey @zanettin, right now @nxext/stencil isn’t compatible with any stencil version higher than 2.6. The APIs I need right now are not public yet, but I’m already talking with the Stencil Team how to proceed 😁

@RainerAtSpirit
Copy link

I was running into the same. I can confirm that pinning "@stencil/core": "2.6.0", in package.json solved it.

@DominikPieper
Copy link
Member

I had a meeting with William about proceeding with it, and it will be solved with a new Stencil version. Right now, I'm unfortunately not able to solve this for Stencil > 2.6 until a new release.

@DominikPieper
Copy link
Member

@zanettin could you re-test with 2.9? The singleton for the telemetry is away now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants