Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install for nodejs #1299

Closed
maxwowpow opened this issue Apr 27, 2023 · 1 comment
Closed

npm install for nodejs #1299

maxwowpow opened this issue Apr 27, 2023 · 1 comment

Comments

@maxwowpow
Copy link

maxwowpow commented Apr 27, 2023

Bug report

  • no release/dist on npm install npm install @svgdotjs/svg.js.
  • currently package.json refers /dist folder for release/compiled version.
  • currently only release section and cdns have a compiled version.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'XXX\node_modules\@svgdotjs\svg.js\' imported from app.js
    at new NodeError (node:internal/errors:399:5)
    at legacyMainResolve (node:internal/modules/esm/resolve:202:9)

Explanation

  • What is the behaviour you expect?
    as advertised to setup a library version 3 run npm install @svgdotjs/svg.js,
    expected a package usable from nodejs.

  • What is happening instead?
    only sources are pulled on npm install

  • What error message are you getting?

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'XXX\node_modules\@svgdotjs\svg.js\' imported from app.js
    at new NodeError (node:internal/errors:399:5)
    at legacyMainResolve (node:internal/modules/esm/resolve:202:9)
@Fuzzyma
Copy link
Member

Fuzzyma commented Sep 2, 2023

Cant reproduce.
My package.json has

{
  "devDependencies": {
    "@svgdotjs/svg.js": "^3.2.0"
  }
}

and i simply write

const { SVG, registerWindow } = require('@svgdotjs/svg.js')

and it works. Closing this as not reproducible

@Fuzzyma Fuzzyma closed this as completed Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants