Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Prasanna

Members
  • Posts

    22
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I just received an update from DeployHq: In order to use a private npm package within the build pipeline, you'd need to create an auth.json file, including the password/token to access the private repo. You can set this up as a config file within DeployHQ, to stop you from having to save sensitive data within your repository: https://www.deployhq.com/support/config-files This should solve the problem @Stoggy
  2. @Stoggy - can you help us with the package.json file? (Only the line containing `@gsap/shockingly` dependency would be sufficient) Update: You need to set the config in DeployHQ:
  3. Hey all, apologies for the delay in my response - I was out travelling last week. The problem with yarn classic is that `$yarn install` might not work with package name aliases. So this means: * $yarn add gsap@npm:@gsap/shockingly -> this works * import GSAP from 'gsap' -> this works But, if you run $ rm -rf node_modules and then run $ yarn install - the installation fails. This is because yarn classic has an active bug with package name aliases which defaults to the default npm registry. So, as a workaround you can do either of these: 1. Do not use package name alias: $ yarn add @gsap/shockingly -> and then import GSAP from '@gsap/shockingly' 2. Set the global registry to Greensock: $npm config set registry https://npm.greensock.com and follow the rest of the instructions specified: https://greensock.com/docs/v3/Installation#private
  4. @Savvytech this issue seems to be a bug in the npm cli. NPM had fixed this bug earlier but it seems like the issue has reappeared in the latest update. There are bugs raised previously (ref: https://github.com/npm/cli/issues/1703#issuecomment-774684656) and it's mainly due to package name aliases. So, if you want to get rid of this issue then the simplest solution would be to not use package name alias. Here's how to use gsap package without package name alias: Installation: $ npm install @gsap/member Usage: import GSAP from '@gsap/member' I hope this helps
  5. @monolith - have you tried switching to yarn berry? If yes then you can follow these instructions:
  6. Looks like your token is invalid. You might need to re-check the token added by you. Type these commands to reset the token: $ npm config set @gsap:registry https://npm.greensock.com/ $ npm config set //npm.greensock.com/:_authToken <your-auth-token> $ npm install @gsap/business $ npm install gsap@npm:@gsap/business This should solve the issue
  7. @Gr0x - looking at the .npmrc file content that you provided, it should throw errors in while running $npm install your local environment (unless you specify env vars). But it should be working fine in netlify.
  8. @Gr0x - could your share a screenshot of the .npmrc file in the project? I think there could be a very minor issue in the configuration
  9. Hey @sybilrondeau, it's easier to deploy if you use the private npm package in your project. You can add the same in your project by running the following commands: $ npm config set @gsap:registry https://npm.greensock.com/ $ npm config set //npm.greensock.com/:_authToken <your-auth-token> $ npm install @gsap/business $ npm install gsap@npm:@gsap/business If you want to deploy the same to netlify, then you can follow the instructions that I have mentioned here: On the other hand, if you wish to use the .tgz files, then you need to add the .tgz file to your project and push the same to git.
  10. Here's how you can use the club gsap packages on netlify: Steps: 1. Add a .npmrc to the root of the project and type in the following: ``` always-auth=true @gsap:registry=https://npm.greensock.com/ //npm.greensock.com/:_authToken=${NPM_TOKEN} ``` Please note that after adding this file npm install in the project fails as the local environment variable is not specified. To solve this you can either set the environment variable in your machine, or run the npm commands with env prefix like this:$env NPM_TOKEN="<your token>" npm install. Or, you can also temporarily rename the .npmrc file to any other filename and revert the changes before pushing the same to git. 2. Configure the environment variable in netlify like this(use your token under value): That's all. The installs should then be working fine for you Let me know if you're stuck at any point
  11. One workaround is to use the npm package as is. For example: $ npm install @gsap/shockingly But then you need to import the package like this: import { gsap } from '@gsap/shockingly'
  12. Yeah, you might wanna delete the node_modules directory before trying again.
  13. If you setup the auth-token properly the installation seems to work fine. You could find detailed instruction here which works with the private registry:
  14. Hey @Yellow Car, this is what's going on when you execute each commands: $ npm config set @gsap:registry https://npm.greensock.com/ ^ This command adds the following entry to the ~/.npmrc file: @gsap:registry=https://npm.greensock.com $ npm config set //npm.greensock.com/:_authToken <your-auth-token> ^ Just like the previous this command adds the following entry to the ~/.npmrc file: //npm.greensock.com/:_authToken=<your-auth-token> You might notice that the above entries are the exact lines specified in the Greensock installation docs. But sometimes, manual errors might cause some issues while entering data into the .npmrc file like adding/missing an extra space/character. These commands just prevents the same from happening. $ npm install @gsap/business ^ This command is required to fill the npm cache in npm v7. I'ts a weird bug introduced in the npm v7 that causes installation failures while using package name aliases $ npm install gsap@npm:@gsap/business Finally, this is the command that installs the package "@gsap/business" and gives it an alias name "gsap". As a result, you can import code from the business package like all other regular greensock packages: import GSAP from 'gsap' - this will import code from @gsap/business package in our case Pretty cool huh?
  15. Can you try doing this: Delete the .npmrc file in the project then run the following commands (don't forget to replace the <your-auth-token> with the correct token $ npm config set @gsap:registry https://npm.greensock.com/ $ npm config set //npm.greensock.com/:_authToken <your-auth-token> $ npm install @gsap/business $ npm install gsap@npm:@gsap/business This should solve the issues Let me know if it still doesn't work
×