You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Stencil Version
4.28.0
Current Behavior
After updating to the latest StencilJS version, which includes an upgrade to the latest Rollup version, Rollup no longer processes .cts files correctly. This issue affects importing functions from libphonenumber-js. The same configuration worked fine in previous StencilJS versions.
This is the debug output:
Rollup: Parse Error: ../../../node_modules/libphonenumber-js/index.d.cts:42:20
RollupError: ../../../node_modules/libphonenumber-js/index.d.cts (42:20): Expected ',', got ':' (Note that
you need plugins to import files that are not JavaScript)
at getRollupError .../node_modules/@stencil/core/compiler/stencil.js:211989:39
at ParseError2.initialise .../node_modules/@stencil/core/compiler/stencil.js:227004:29
at convertNode2 .../node_modules/@stencil/core/compiler/stencil.js:215372:8
at convertProgram2 .../node_modules/@stencil/core/compiler/stencil.js:215358:10
at _Module.setSource .../node_modules/@stencil/core/compiler/stencil.js:229401:22
at async ModuleLoader.addModuleSource .../node_modules/@stencil/core/compiler/stencil.js:231346:11
Expected Behavior
The build succeeds.
System Info
Steps to Reproduce
Update StencilJS to the latest version, which includes the Rollup upgrade.
Use a project with a component .tsx file that imports functions from libphonenumber-js.
Run the StencilJS build process.
Observe that Rollup fails to process .cts files, causing the build to break.
+1, had similar issues for .d.mts, had to back down to 4.27.2 was missing @rollup/rollup-darwin-arm64, resolved this by adding it to my dev packages, then had:
Rollup: Parse Error: node_modules/i18next-browser-languagedetector/index.d.mts:5:7 node_modules/i18next-browser-languagedetector/index.d.mts (5:7): Expected '{', got 'type' (Note that you need plugins to import files that are not JavaScript)
Just teething problems dealing with a major rollup upgrade (2 > 4) ... it used to ignore a package's exports and now ... it doesn't - so we have to tweak stencil to cope with these new file types.
Prerequisites
Stencil Version
4.28.0
Current Behavior
After updating to the latest StencilJS version, which includes an upgrade to the latest Rollup version, Rollup no longer processes .cts files correctly. This issue affects importing functions from libphonenumber-js. The same configuration worked fine in previous StencilJS versions.
This is the debug output:
Rollup: Parse Error: ../../../node_modules/libphonenumber-js/index.d.cts:42:20
RollupError: ../../../node_modules/libphonenumber-js/index.d.cts (42:20): Expected ',', got ':' (Note that
you need plugins to import files that are not JavaScript)
at getRollupError .../node_modules/@stencil/core/compiler/stencil.js:211989:39
at ParseError2.initialise .../node_modules/@stencil/core/compiler/stencil.js:227004:29
at convertNode2 .../node_modules/@stencil/core/compiler/stencil.js:215372:8
at convertProgram2 .../node_modules/@stencil/core/compiler/stencil.js:215358:10
at _Module.setSource .../node_modules/@stencil/core/compiler/stencil.js:229401:22
at async ModuleLoader.addModuleSource .../node_modules/@stencil/core/compiler/stencil.js:231346:11
Expected Behavior
The build succeeds.
System Info
Steps to Reproduce
Code Reproduction URL
https://www.google.com
Additional Information
This issue may be the same as #6193 and may have the same solution.
The text was updated successfully, but these errors were encountered: