Girish21 / speed-metal-stack

The Remix Blog Stack for deploying to Fly with MDX, SQLite, testing, linting, formatting, etc.

Home Page:https://remix.run/stacks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on npm run build

niklasgrewe opened this issue · comments

When i create a brand new project and run npm run build i get the following error:

/path/to/project/node_modules/@remix-run/dev/cli/create.js:26
var sortPackageJSON = require('sort-package-json');
                      ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/project/node_modules/sort-package-json/index.js from /path/to/project/node_modules/@remix-run/dev/cli/create.js not supported.
Instead change the require of index.js in /path/to/project/node_modules/@remix-run/dev/cli/create.js to a dynamic import() which is available in all CommonJS modules.

I took the following steps:

  1. create a new project
npx create-remix --template Girish21/speed-metal-stack
  1. run npm run setup
  2. run npm run build

i am using Node.js v17.2.0

The error is apparently a bug in Remix and is already tracked here: remix-run/remix#3044