skeletonlabs / create-skeleton-app

CLI installer for Skeleton apps and monorepo for the sites that form the templates
16 stars 5 forks source link

new skeleton-app warns about `(node:51695) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. (Use `node --trace-warnings ...` to show where the warning was created)` #49

Closed fbehrens closed 4 months ago

fbehrens commented 4 months ago

Hi, when i am creating a skeleton-app with the cli-installer

npm create skeleton-app@latest svsk

i got the following warning, when i start vite dev

(node:51695) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.

I don't know if this is a problem, but it makes me suspicious, and I want to report it here.

I am on latest macOS 14.5 with node v22.2.0

npm create skeleton-app@latest svsk

> npx
> create-skeleton-app svsk

β”Œ  Create Skeleton App (version 0.0.55)

Welcome to Skeleton πŸ’€! A UI toolkit for Svelte + Tailwind

Problems? Open an issue on https://github.com/skeletonlabs/skeleton/issues if none exists already.
β”‚
β—‡  Which Skeleton app template?
β”‚  AppShell starter
β”‚
β—‡  Select a theme (top most selection will be default):
β”‚  Skeleton
β”‚
β—‡
What other packages would you like to install:
β”‚  none
β”‚
β—‡  Add type checking with TypeScript?
β”‚  Yes, using TypeScript syntax
β”‚
β—‡  What would you like setup in your project:
β”‚  Add ESLint for code linting?, Add Prettier for code formatting?, Add Vitest for unit testing?
β”‚
β—‡  Done installing

Done! You can now:

cd svsk
npm install
npm run dev
Need some help or found an issue? Visit us on Discord https://discord.gg/EXqV7W8MtY
cd svsk/
npm i
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

added 358 packages, and audited 359 packages in 18s

102 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm run dev

> svsk@0.0.1 dev
> vite dev

(node:51695) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
Forced re-optimization of dependencies

  VITE v5.2.13  ready in 575 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
(node:51695) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
endigo9740 commented 4 months ago

@fbehrens just curious if the app is in a functional state or if this is blocking.

@niktek any ideas? Node v22.2.0 is newer than I run, so may be related?

fbehrens commented 4 months ago

I forgot to mention:

The app seems in a functional state

fbehrens commented 4 months ago

The error shows

once on startup, and

once after first page load.

To me, it looks suspicious, as if there was something wrong

image
Sarenor commented 4 months ago

Can you try if it works with the current Node LTS ( v20.14.0), @fbehrens?

I feel like that might be the root of the issue.

fbehrens commented 4 months ago

Yes, no errors with node v20.14.0

Sarenor commented 4 months ago

Then I'd probably close this issue since we're only really supporting LTS versions, simply because some of the dependencies also only support LTS versions.

endigo9740 commented 4 months ago

I'm going to agree with Sarenor here. Probably best to stick with the LTS version. We'll likely jump to the next LTS as part of the Skeleton v3 updates in the future, so keep an eye out for that.