-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.26.7 + ember-animated: Definietly assigned fields and fields with the 'declare' modifier cannot be initialized here, but only in the constructor #422
Comments
I'm seeing this same issue even after upgrading all of my |
same, I've even been trying to minimally reproduce the issue with: // This file is only tested with Node 12+
/* eslint-disable node/no-unsupported-features/es-syntax */
'use strict';
const fs = require('fs/promises');
const os = require('os');
const path = require('path');
const execa = require('execa');
const root = path.join(__dirname, '..');
async function runTest() {
let tmpDirectory = await fs.mkdtemp(path.join(os.tmpdir(), 'ember-cli-babel-ember-new-test'));
let appName = 'my-app';
let appRoot = path.join(tmpDirectory, appName);
// Must be fully type-valid or else ember-cli crashes
// https://github.com/ember-cli/ember-cli/issues/9584
let decoratorsExample = `
import { inject as service } from '@ember/service';
import type RouterService from '@ember/routing/router-service';
export class A {
@service declare router: RouterService;
@service('router') _router!: RouterService;
get queryParams() {
return this.router.currentRoute.queryParams;
}
}
`
await execa('yarn', ['link'], { cwd: root, stdio: 'inherit' });
await execa('npx', ['ember-cli', 'new', appName, '--yarn', '--skip-git'], { cwd: tmpDirectory, stdio: 'inherit' });
await execa('ember', ['install', 'ember-cli-typescript'], { cwd: appRoot, stdio: 'inherit' });
// await execa('yarn', ['add', '@babel/[email protected]'], { cwd: appRoot, stdio: 'inherit' });
// await execa('yarn', ['add', '[email protected]'], { cwd: appRoot, stdio: 'inherit' });
await execa('yarn', ['link', 'ember-cli-babel'], { cwd: appRoot, stdio: 'inherit' });
await fs.writeFile(path.join(appRoot, 'app', 'decorators-example.ts'), decoratorsExample);
await execa('ember', ['test'], { cwd: appRoot, stdio: 'inherit' });
}
runTest(); but no dice. |
This was referenced Dec 16, 2021
resolved |
Stumbled upon this error today after updating ember-cli-babel to the latest version (7.26.11). Apparently this is resolved but I'm not sure how. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error log
The code that this comes from:
https://github.com/ember-animation/ember-animated/blob/master/addon/components/animated-beacon.ts#L76
I don't see declare 🤷
I probably need to figure out some lockfile changes (big monorepo, so I can't just re-roll it)
The text was updated successfully, but these errors were encountered: