Using a NPM package that has / in name? #26686
-
I'm trying to use the package @paddlejs-models/ocr, but when I attempt to import it using: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The error message is correct. The package - import * as ocr from 'npm:paddlejs-models/ocr';
+ import * as ocr from 'npm:@paddlejs-models/ocr'; |
Beta Was this translation helpful? Give feedback.
-
Thank you! Adding @ fixed it. |
Beta Was this translation helpful? Give feedback.
The error message is correct. The package
paddlejs-models
doesn't exist on npm. I think you meant to use@paddlejs-models/ocr
instead which is a valid package name. The format on npm for these is@<scope>/<name>
. You cannot leave out the@
character though, same as in Node. Scoped package names must always start with the@
character.