
krissss
-
Posts
7 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
ScrollTrigger Demos
Downloads
Posts posted by krissss
-
-
Hello network !
gsap version: 3
I'm experiencing some issues with gsap-bonus.tgz with yarn. The packages im trying to install are from monorepo, or basically they present a custom framework. Since i devided them into private packages in npmjs, when i try to run yarn command to install these packages, the package which includes gsap-bonus.tgz throws an error:error "packages/app/gsap-bonus.tgz": Tarball is not in network and can not be located in cache (["C:\\Users\\Kristiyan\\Documents\\GAMES\\leprechaun-respins\\packages\\app\\gsap-bonus.tgz","C:\\Users\\Kristiyan\\AppData\\Local\\Yarn\\Cache\\v6\\.tmp\\666fb417fd4c77f48a6f166bd0b8e500\\.yarn-tarball.tgz"])
The gsap-bonus.tgz file started making problems since we published the private packages in npmjs.
This is how the package.json file dependencies looks like inside the game im trying to develop (gsap-bonus.tgz is inside @silverbackgmng/app) :"dependencies": { "@silverbackgmng/app": "^1.0.70", "@silverbackgmng/config": "^1.0.40", "@silverbackgmng/contracts": "^1.0.50", "@silverbackgmng/engine": "^1.0.50", "@silverbackgmng/localization": "^1.0.30", "@silverbackgmng/manifest": "^1.0.1", "csvjson-csv2json": "^5.0.60" }
and this is the package.json file dependencies inside @silverbackgmng/app private package:
"dependencies": { "@silverbackgmng/engine": "^1.0.22", "@silverbackgmng/slot": "^1.0.11", "@silverbackgmng/ui": "^1.0.26", "@types/howler": "2.2.1", "@types/webpack-env": "1.16.0", "eventemitter3": "4.0.7", "gsap": "file:gsap-bonus.tgz", "howler": "2.2.1", "lerna": "^4.0.0", "pixi-viewport": "4.18.1", "pixi.js-legacy": "5.3.3" }
Do you have any suggestions why that issue occurs?
-
guys, fixing the issues after uninstalling @types/gsap solved my issue. Now after build, there is no error that gsap is not defined :).
The issues were of sort that delayedCall does not exists in TweenMax, TweenLite and etc, so i imported everywhere gsap and used gsap.delayedCall.
Im really happy, thank you very much ! ❤️
-
3
-
-
5 minutes ago, OSUblake said:
Like Jack said, make sure you uninstall @types/gsap.
Well, after uninstalling it, a lot of errors occured.
P.C Will try to fix them, and see if that solves the problem. Will keep you updated. Thank you all ! -
6 minutes ago, ZachSaucier said:
Are you using the old GSAP 2 files perhaps?
you mean the files inside gsap-bonus.tgz ?
-
1) I forgot to mention that
import { gsap } from "gsap";
works locally, but when trying to build (npm run build), an error occurs
TS2614: Module '"gsap"' has no exported member 'gsap'. Did you mean to use 'import gsap from "gsap"' instead?
2) I have only two references to gsap, and they are inside the modules im importing gsap.
Also to mark, that i have other modules in which im importing TweenMax,TweenLite and etc.. -
Hello everyone.
I have the following issue :
Im importing in two different files gsap like this
import gsap from 'gsap';
In one of the files, im animating with CustomEase like this : gsap.to(...)
In the other file, im imprting gsap to register PixiPlugin.
Everything works great, until i decide to deploy my app.bundle.js ( after npm run build).
After deploy an error occurs in console:ReferenceError: gsap is not defined
I found a solution, which is importing gsap only in one file, and registering plugins there, like this :
import gsap from 'gsap'; import PixiPlugin from "gsap/PixiPlugin"; import { CustomEase } from 'gsap/CustomEase'; gsap.registerPlugin(PixiPlugin,CustomEase); PixiPlugin.registerPIXI(PIXI);
and a few lines below, im attaching gsap to the window object like this :
window.gsap = gsap;
So whenever i need it, i have access to gsap from the window scope. But i don't think that solution is clever enough.
Can someone help me figuring out, why i receive the error i mentioned above after build ?
This is how my package.json looks like:
{ "name": "ssss", "version": "1.0.0", "description": "aaaaa", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack --config webpack.prod.js", "start": "webpack-dev-server --open --config webpack.dev.js" }, "author": "cccc", "license": "MIT", "devDependencies": { "@typescript-eslint/eslint-plugin": "^2.10.0", "@typescript-eslint/parser": "^2.10.0", "eslint-loader": "^3.0.2", "eslint-plugin-react": "^7.17.0", "terser-webpack-plugin": "^2.3.0", "ts-loader": "^6.2.1", "typescript": "^3.7.3", "webpack": "^4.41.2", "webpack-cli": "^3.3.10", "webpack-dev-server": "^3.9.0", "webpack-merge": "^4.2.2" }, "dependencies": { "@types/gsap": "^1.20.2", "@types/ua-parser-js": "^0.7.33", "axios": "^0.19.1", "eslint": "^6.7.2", "eventemitter3": "^4.0.0", "gsap": "file:gsap-bonus.tgz", "pixi.js": "^5.2.0", "pixi.js-legacy": "^5.2.0", "ua-parser-js": "^0.7.20" } }
Thank you in advance
gsap-bonus.tgz prevents private npmjs package from installation
in GSAP
Posted
After 2 days of fighting the issue this is the solution for me:
when publishing a package, i was using
yarn publish
command, which seems to make a local cache while publishing, and when someone tries to install the published packages, the error occurs.
Using
npm publish
fixes the issue for me.
So @OSUblake was right,
haha
Cheers!