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
Hmmm.. what version of Node are you on? I just added that in the last release earlier this week. But I suspect it is a Node version thing.
Yeah.. they only added support in Node 12. I didn't realize it was that recent. Atleast Node 12 is LTS, and Node 10 is already in maintenance on the way out. But it's technically supported for another year I guess. Decent browser support: https://caniuse.com/#search=globalThis. That's a shame. This solves the global versus window issues for code that runs on client and the server. Polyfilling seems awkward: https://mathiasbynens.be/notes/globalthis. Ok I will have to make a call on this.
I've tried on Node 10. It didn't work, I read about it a bit and came to the same conclusion that 12 should work. So I tried on 12 as well and it still didn't work. I'll check the links you mentioned.
If it didn't work in 12 something else may be going.
I am using 12 and haven't had any issues running local tests. I haven't tried the tests in create-solid since then though so I will give it a shot as well. I was hoping the upgrade to 12 would just handle it. For once it looks like TS isn't the culprit. Let me know if you make any progress. I will give it a shot in a few hours when I can get back on my computer and do a clean install and test.
Ok, yeah clean install of both standard and typescript versions. Tests seem to be working. I'm on Node 12.11.1. Not sure if there is something more specific version wise. Node update might require you to re-open the terminal if you use a node version manager like nvm. So node --version right before you run the tests to make sure it's the right version. Not really sure what else the issue could be.
I did what you've suggested and I have node version v12.16.3 running right now. Indeed I do use NVM, so restarting the terminal instance helped.
However, now I'm getting the following error:
FAIL src/App.test.tsx
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
....
It looks like parts of the configuration aren't aware that I'm running TypeScript...
Are you using the TypeScript template? Ie. created via npm init solid ts-app my-app. The original issue lead me to believe this was the js template you were having issues with. Technically speaking it's in the config so it should work either way. But maybe the tsconfig.json differs if this started as a js project?
Activity
ryansolid commentedon May 16, 2020
Hmmm.. what version of Node are you on? I just added that in the last release earlier this week. But I suspect it is a Node version thing.
Yeah.. they only added support in Node 12. I didn't realize it was that recent. Atleast Node 12 is LTS, and Node 10 is already in maintenance on the way out. But it's technically supported for another year I guess. Decent browser support: https://caniuse.com/#search=globalThis. That's a shame. This solves the global versus window issues for code that runs on client and the server. Polyfilling seems awkward: https://mathiasbynens.be/notes/globalthis. Ok I will have to make a call on this.
cannahum commentedon May 16, 2020
I've tried on Node 10. It didn't work, I read about it a bit and came to the same conclusion that 12 should work. So I tried on 12 as well and it still didn't work. I'll check the links you mentioned.
ryansolid commentedon May 16, 2020
If it didn't work in 12 something else may be going.
I am using 12 and haven't had any issues running local tests. I haven't tried the tests in create-solid since then though so I will give it a shot as well. I was hoping the upgrade to 12 would just handle it. For once it looks like TS isn't the culprit. Let me know if you make any progress. I will give it a shot in a few hours when I can get back on my computer and do a clean install and test.
ryansolid commentedon May 17, 2020
Ok, yeah clean install of both standard and typescript versions. Tests seem to be working. I'm on Node 12.11.1. Not sure if there is something more specific version wise. Node update might require you to re-open the terminal if you use a node version manager like nvm. So
node --versionright before you run the tests to make sure it's the right version. Not really sure what else the issue could be.cannahum commentedon May 20, 2020
I did what you've suggested and I have node version
v12.16.3running right now. Indeed I do use NVM, so restarting the terminal instance helped.However, now I'm getting the following error:
It looks like parts of the configuration aren't aware that I'm running TypeScript...
ryansolid commentedon May 20, 2020
Are you using the TypeScript template? Ie. created via
npm init solid ts-app my-app. The original issue lead me to believe this was the js template you were having issues with. Technically speaking it's in the config so it should work either way. But maybe thetsconfig.jsondiffers if this started as a js project?ryansolid commentedon May 27, 2020
Any progress? I don't think I will be much help without more information.
ryansolid commentedon May 29, 2020
Closing due to lack of activity.
perf(compiler): write non-ASCII SSR template text as character refere…