West
November 29, 2023, 2:50am
1
Hello,
I’m new to CBwire and for the most part it’s working, until today I tried adding “EnableTurbo” : true to my Coldbox.cfc. I believe I’m using the latest version of CBWire.
cbwire : {
"autoInjectAssets": true,
"enableTurbo": true
}
I get an error in my Chrome browser console.
Any idea on how to resolve this error?
Hi, @West !
Call me crazy, but the full error message would be helpful here. What does it look like when you click on the error in the console, to expand the error stack trace?
I’m wondering, if you try the manual installation method, do you have any more luck?
West
November 29, 2023, 5:56pm
3
@MichaelBorn - There isn’t much showing at all. Here is a screenshot showing the expanded stack trace. I have not tried the manual installation, but I will later today as time allows and post back.
1 Like
gcopley
November 29, 2023, 6:16pm
4
@West There appears to be a recent issue reported with the unversioned Turbo link on Skypack, which is what CBWIRE defaults to using.
opened 05:51PM - 23 Nov 23 UTC
https://cdn.skypack.dev/@hotwired/turbo => https://cdn.skypack.dev/error/build:@… hotwired/turbo@v8.0.0-beta.1-NQpOJtGG100FOymVpgdB
```
/*
* [Package Error] "@hotwired/turbo@v8.0.0-beta.1" could not be built.
*
* [1/5] Verifying package is valid…
* [2/5] Installing dependencies from npm…
* [3/5] Building package using esinstall…
* Running esinstall...
* Failed to load node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js
* Unexpected token (818:8) in @hotwired/turbo/dist/turbo.es2017-esm.js
* Install failed.
* Install failed.
*
* How to fix:
* - If you believe this to be an error in Skypack, file an issue here: https://github.com/skypackjs/skypack-cdn/issues
* - If you believe this to be an issue in the package, share this URL with the package authors to help them debug & fix.
* - Use https://skypack.dev/ to find a web-friendly alternative to find another package.
*/
console.warn("[Package Error] \"@hotwired/turbo@v8.0.0-beta.1\" could not be built. \n[1/5] Verifying package is valid…\n[2/5] Installing dependencies from npm…\n[3/5] Building package using esinstall…\nRunning esinstall...\nFailed to load node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js\n Unexpected token (818:8) in @hotwired/turbo/dist/turbo.es2017-esm.js\nInstall failed.\nInstall failed.");
throw new Error("[Package Error] \"@hotwired/turbo@v8.0.0-beta.1\" could not be built. ");
export default null;
```
As a workaround, you can disable ‘enableTurbo’ and then manually add the references in your layout file.
cbwire : {
"autoInjectAssets": true,
"enableTurbo": false
}
In your layout file:
<head>
<script type="module">
import hotwiredTurbo from 'https://cdn.skypack.dev/@hotwired/turbo@7.3.0';
</script>
</head>
You can leave the setting ‘autoInjectAssets’ enabled.
West
November 29, 2023, 9:12pm
5
Thanks! That resolved the error.