Closed bjornbrasse closed 7 months ago
Running locally with npm run dev
now results in the same error... The problem is in using "tsx" in the scripts. It also happens when running build:server
.
Where is Node v20.6.0
coming from? I'm using nvm and my node is 18.19.0... ???
running command with prefix "de."
> predev
> npm run build:icons --silent
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
Error: tsx must be loaded with --import instead of --loader
The --loader flag was deprecated in Node v20.6.0
at Q (file:///Users/bjorn/Documents/Coding/kwestjan/node_modules/tsx/dist/esm/index.mjs:1:1793)
at Hooks.addCustomLoader (node:internal/modules/esm/hooks:202:24)
at Hooks.register (node:internal/modules/esm/hooks:168:16)
at async initializeHooks (node:internal/modules/esm/utils:167:5)
at async customizedModuleWorker (node:internal/modules/esm/worker:104:24)
Node.js v18.19.0
NPM command npm run dev -- failed with code 1
Could it have to do with this merge? https://github.com/epicweb-dev/epic-stack/pull/498 @xHomu ?
I think this is actually a sly-cli issue, since i didn't end up bumping node to 20 in my pr. @jacobparis might be more informed with how sly uses tsx under the hood.
Lol I was getting a little skeptical as I started getting this error on deploy of my already running app, where I just made some frontend edits since the previous day's successful deploy. Before that, I was getting ready to update my app's remix from 2.1 to 2.3 (but didn't as this issue appeared). Then I tried to get up and running a completely new epic-stack app, but the issue remained. So I guess this issue is happening somewhere between our apps and fly's services and not from any change in our apps..?
Edit: I am also using Node v18 (18.16.1), so I didn't understand where it gets the Node v20.6.0's deprecated reference.
I get the same error today when trying do deploy staging and production. I was able to fix it with bellow steps:
node-version: 18
to node-version: 20
in .github/workflows/deploy.yml
file.package.json
node_modules
and package-lock.json
.nvmrc
i change my version of node to lts/hydrogen
alsonpm install
git push origin dev
- dev branch for staging buildgit push origin main
- main branch for production buildHope this helps
Worked for me, thanks @YuriiF !! Still obscure where this error came from, but perhaps it's time to up the node version. That's up to Kent of course...
Yes. I think it's about time to upgrade. Thanks! Will do this soon. PR welcome!
I get the same error today when trying do deploy staging and production. I was able to fix it with bellow steps:
- change all
node-version: 18
tonode-version: 20
in.github/workflows/deploy.yml
file.- change
package.json
- remove
node_modules
andpackage-lock.json
- as i use
.nvmrc
i change my version of node tolts/hydrogen
also- run
npm install
git push origin dev
- dev branch for staging buildgit push origin main
- main branch for production buildHope this helps
This alone did not work until I also updated the Dockerfile to pull in Node 20 as base. i.e.
from node:20-bookworm-slim as base
@ all - Issue resolved in #545. Upgraded to node v20.
Hi, When setting up a new project with
npx create-epic-app@latest
I get an error when doing a direct deploy on fly. I'm logged in already, so don't expect a problem there. Looks like the problem occurs duringbuild:icons
. And a little before that theRUN npm prune --omit=dev
gets canceled.Trying deployment again later with Gihub actions - FLY_API_TOKEN set - results in the same errors.
Could you find out what's happening here?? Greatly appreciated!
Grtz. B.
These are the logs: