SolidJSS
SolidJSโ€ข3y agoโ€ข
2 replies
ChrisThornham

NPM Start Error + Beginner Question

I'm new to SolidStart, and I've only been doing web dev with NPM for a few months.

Typically, in all of the projects I've been building, I use
npm run dev
to view my project on a local server.

I watched Ryan's "SolidStart: The Shape of Frameworks to Come" stream on YouTube, and I noticed he was using npm run build and npm run start.

I ran npm run build and then npm run start in my project, and I got the following error after running npm run start.

> start
> node ./.output/server/index.mjs

file:///Users/project-path/.output/server/chunks/nitro/node-server.mjs:6501
throw new Error("Should be provided by compiler");
      ^

Error: Should be provided by compiler
    at file:///Users/project-path/.output/server/chunks/nitro/node-server.mjs:6501:7
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

Node.js v21.4.0


So my first question is, does anyone know what's wrong with this?

My second question is:

Where can I learn more about the difference between:
npm run dev

npm run build
npm run start

I think you "build" a project and then deploy that project with the output, but I'm not sure.

Long story short, I'd like to be more capable of handling these errors, but I don't know where to start.

Thanks,

Chris
Was this page helpful?