Closed TobiasJu closed 3 years ago
Apparently the error is coming from an old package @streamlinehq/streamline-regular
which was installed from Cloudsmith (please correct me if I'm wrong). The only package you need right now is @streamlinehq/streamlinehq
. Eg you should uninstall any packages like
"@streamlinehq/streamline-bold": "^0.6.1",
"@streamlinehq/streamline-mini-bold": "0.6.1",
"@streamlinehq/streamline-regular": "0.6.1",
"@streamlinehq/streamline-wrapper-react": "^1.3.2",
and have only
"@streamlinehq/streamlinehq": "^1.0.3",
in your package.json
and let it fetch the images for you.
I've edited the README file to reflect this.
Yes the old streamline packages like @streamlinehq/streamline-regular
did cause this error, thanks for the quick response.
I tried to migrate to the new "@streamlinehq/streamlinehq": "^1.0.4",
But we do not use yarn, we only use npm for packages, so the >npm i @streamlinehq/streamlinehq
fails.
Why do you guys deliver a npm package which depends on yarn?
I believe npm commands will work just as fine, can you try those? Which command is failing? Perhaps you're having a configuration issue caused by previous packages like described here https://github.com/webalys-hq/streamlinehq-npm/issues/5?
I removed the token from the .npmrc, (streamlinehq.json is already present).
Than i added "@streamlinehq/streamlinehq": "^1.0.4",
to my package.json and run 'npm install' inside my IDE.
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" install --scripts-prepend-node-path=auto
> @streamlinehq/streamlinehq@1.0.4 postinstall C:\Users\tjuhre\GIT\angular\node_modules\@streamlinehq\streamlinehq
> yarn start
The command "yarn" is either misspelled or could not be found.
...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @streamlinehq/streamlinehq@1.0.4 postinstall: `yarn start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @streamlinehq/streamlinehq@1.0.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\tjuhre\AppData\Roaming\npm-cache\_logs
Looks like it tries to start yarn, but it's not installed. And i really do not want to use 2 package managers. I mean this is not Python.
The link you've posted corresponds to a different case when you try to run npm install
and yarn
in the same project, which results in package-lock.json
and yarn.lock
. This is not the case here. If you install yarn
globally it will just work and won't pollute your project with any extra files (as far as I know). Personally I have both yarn and npm installed for several years on my local machine.
I agree though that it should be up to a developer to choose a package manager. I will research ways to improve this
Thank you for your understanding. My team is strictly against using two package managers. I think this package will get quite popular, so i think your investigation will also help many others.
Okay I have migrated to npm since it's the default packages manager. It just works.
This change is implemented in version 2.0.0 https://github.com/webalys-hq/streamlinehq-npm/releases/tag/2.0.0. Please note that it introduces a couple of other breaking changes as well.
Please check it out and tell if it solves your issue.
Well this was exceptionally fast, thanks! It solved my yarn problem indeed and i could successfully install the package. Something looks still a bit odd, all the svg icons have an alphanumeric string at the end, is this wanted?
Yup, that was introduced as a measure to fight the naming conflict as some images had the same names across families and categories, see https://github.com/webalys-hq/streamlinehq-npm/issues/6. See our updated readme https://github.com/webalys-hq/streamlinehq-npm#how-to-find-a-path-to-a-streamline-image for more info
Hi there, good news, i got the icons dispalyed in my application. And i really like your wrapper.
But it gives me this error: