Closed Fiercevd closed 2 years ago
Also receiving this error. My reproduction steps:
The problem comes when loading the canvas-confetti module.
Don't want to submit a PR as this is not a real fix, but you can circumvent the compiling error by editing the file ~/[...]/fair-launch/src/confetti.tsx
and adding // @ts-ignore
right before import confetti from 'canvas-confetti';
:
import confetti from 'canvas-confetti'; -> // @ts-ignore
import confetti from 'canvas-confetti';
@guillemavila i tried this but it still doesn't work
@guillemavila @trimpage I am having the exact same issue. Cannot read properties of undefined (reading 'slice')
@guillemavila's fix did not work unfortunately. Why is this happening?
Anyone managed to get it started ?
Having the same problem. @guillemavila fix doesn't work. Do you have any other ideas about what it might be causing this?
im having the same trouble here
same same, fresh from master
Error comes from other folders, not fair-launch folder. Since its a monorepo ts checks for everything it seems.
Solution: Copy paste fair-launch to a different directory and build separately
or checkout to this commit 56de262
That works for me.
๐ This only lead me to another issue:
Failed to compile.
/extras/fair-launch/src/confetti.tsx
TypeScript error in /extras/fair-launch/src/confetti.tsx(2,22):
Could not find a declaration file for module 'canvas-confetti'. '/extras/fair-launch/node_modules/canvas-confetti/src/confetti.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/canvas-confetti` if it exists or add a new declaration (.d.ts) file containing `declare module 'canvas-confetti';` TS7016
1 | import React, { useContext, useEffect, useMemo, useRef } from 'react';
> 2 | import confetti from 'canvas-confetti';
| ^
3 |
4 | export interface ConfettiContextState {
5 | dropConfetti: () => void;
@epomatti Try what the error says ;)
npm i --save-dev @types/canvas-confetti
It's seems it's an error known by the team, try running the frontend from this branch, instead of master
git checkout fix-arweave-upload
yarn install
yarn start
@akserikawa yes did that, but still getting this:
@epomatti Try what the error says ;)
@akserikawa I also don't feel comfortable with using different branches for different modules.
It's seems it's an error known by the team, try running the frontend from this branch, instead of master
I'm running a production project and the monorepo is supposed to keep everything compatible across the different modules, as everything depends pretty much on the candy machine behavior, and don't want to run into weird incompatibility scenarios.
Looking at the fix-arweave-upload
name it doesn't look like it is related to at all to the problem we're facing, so I have no idea what it's in there.
If it was fixed, then why whoever did it didn't just create a small new branch and did the PR separately?
Totally agree with you. master
branch should have working, deployable code.
But it seems the team knows about the issue and I guess they will work on it.
For now, I got it working extracting the whole fair-launch
folder from the fix-arweave-upload
branch to my own repository and installing the confetti package with npm i --save-dev @types/canvas-confetti
Error comes from other folders, not fair-launch folder. Since its a monorepo ts checks for everything it seems. Solution: Copy paste fair-launch to a different directory and build separately or checkout to this commit 56de262 That works for me.
๐ This only lead me to another issue:
Failed to compile. /extras/fair-launch/src/confetti.tsx TypeScript error in /extras/fair-launch/src/confetti.tsx(2,22): Could not find a declaration file for module 'canvas-confetti'. '/extras/fair-launch/node_modules/canvas-confetti/src/confetti.js' implicitly has an 'any' type. Try `npm i --save-dev @types/canvas-confetti` if it exists or add a new declaration (.d.ts) file containing `declare module 'canvas-confetti';` TS7016 1 | import React, { useContext, useEffect, useMemo, useRef } from 'react'; > 2 | import confetti from 'canvas-confetti'; | ^ 3 | 4 | export interface ConfettiContextState { 5 | dropConfetti: () => void;
Ok ill delete my answer
I can confirm the steps posted by @akserikawa worked for me. Not a great solution, but the best option we have at the moment to mint with CMv2.
The problem comes when loading the canvas-confetti module. Don't want to submit a PR as this is not a real fix, but you can circumvent the compiling error by editing the file
~/[...]/fair-launch/src/confetti.tsx
and adding// @ts-ignore
right beforeimport confetti from 'canvas-confetti';
:import confetti from 'canvas-confetti'; -> // @ts-ignore import confetti from 'canvas-confetti';
A detail I ignored and might be important: I've copied the fair-launch folder in another location, which is what I'm deploying to cloudflare pages. @MarkSackerberg explains a possible solution here too.
@MarkSackerberg explains a possible solution here too.
Remote branch fix-arweave-upload not found in upstream origin
It seems like the branch fix-arweave-upload is no longer available and master is still not working. @akserikawa If possible, can you please share the working copy of the fair-launch folder on some secure location? That would be really helpful for the other developers as well.
I copied fair-launch folder to another location then deleted node_modules and did
yarn install
yarn add @types/canvas-confetti --dev
now minting is working
I copied fair-launch folder to another location then deleted node_modules and did
yarn install
yarn add @types/canvas-confetti --dev
now minting is working
Followed those steps, then moved the folder back and it works. Thanks!
Yes, now it's working for me as well. Thank you @devcodeash !
Fair Launch isn't work correctly.
When yarn start in the FLP folder there is an issue:
TypeError: Cannot read properties of undefined (reading 'slice')