Skip to content
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

Babel plugin-proposal-decorators missing when following Quick Start guide #20797

Open
rayjsales opened this issue Nov 17, 2024 · 6 comments
Open

Comments

@rayjsales
Copy link

🐞 Describe the Bug

Following the Quick Start tutorial guide, in the 'Define a Route' section, where it states to add a model() method to the Route in the app/routes/scientists.js file, I get a Parsing error: Cannot find module '@babel/plugin-proposal-decorators'

Screenshot 2024-11-17 at 4 53 29 PM

🔬 Minimal Reproduction

Follow the Quick Start tutorial guide, up to 'Define a Route' section, and then paste in the sample model provided for scientists. I am using ESLint.

my emberJS Tutorial Repo

😕 Actual Behavior

After pasting in the scientist model provided in the Quick Start guide, the Parsing Error shows up. I continue on to the Quick Start guide and loop through each scientist to render the names on the page, and the names do appear.

🤔 Expected Behavior

When running the Quick Start guide, and following all the prompts, all required dependancies should be installed. No errors or issues should show up when running a quick start guide.

🌍 Environment

  • Ember: - 6.0.0
  • Ember-CLI: - 6.0.1
  • Node.js/npm: - v20.11.0
  • OS: darwin x64
  • Browser: Firefox

➕ Additional Context

New user of EmberJS. I am using VSCode with ESLint.

NullVoxPopuli added a commit to NullVoxPopuli/ember-cli that referenced this issue Nov 18, 2024
NullVoxPopuli added a commit to NullVoxPopuli/ember-cli that referenced this issue Nov 18, 2024
@NullVoxPopuli
Copy link
Contributor

First, thank you for reporting!

Apologies though,
I cloned your repo:

❯ git clone git@github.com:rayjsales/emberJS_tutorial.git
❯ cd emberJS_tutorial/
❯ pnpm i

And I was not able to reproduce the issue.
Had you installed dependencies? 🤔

@rayjsales
Copy link
Author

Thank you for getting back to me so quickly.

That's interesting. I was following the Quick Start guide. I thought the required dependencies would have installed when following the guide. From the guide, I ran these commands in the terminal to get the app up and running.

npm install -g ember-cli
ember new ember-quickstart --lang en
cd ember-quickstart
npm start
ember generate route scientists

Then went into the directory to modify this file app/routes/scientists.js. I did run npm install --save-dev @babel/plugin-proposal-decorators to make sure the package is installed. Terminal says 'up to date', but the parsing error is still there.

When I turn off my ESLint the error goes away. My ESLint is configured as default when first installing the extension on VSCode. Could the BUGFIX Add missing package for TS eslint config #10564 still be applicable?

@NullVoxPopuli
Copy link
Contributor

hm, I was unable to reproduce an issue, and my package.json does have:

    "@babel/plugin-proposal-decorators": "^7.25.9",

Here are my exact commands, as they differ slightly (I don't install ember globally)

npx ember-cli@latest new ember-quickstart --lang en
cd ember-quickstart/
npm start
npm exec ember generate route scientists

ould the BUGFIX Add missing package for TS eslint config #10564 still be applicable?

unlikely, the deps are present.

is vscode using a different version of eslint from somewhere else? instead of the local copy of eslint?

@rayjsales
Copy link
Author

I was able to fix the issue. I ran the following commands to fix:

npm uninstall eslint
npm install --save-dev eslint

I did install a handful of other dependencies to try and fix. But the above commands worked. Now in package.json eslint has been upgraded to 9.15.0. I pushed my changes to my repo if you want to review.

Not sure why these commands worked though. It's interesting, because I thought ESLint dependency was already installed.

@kategengler
Copy link
Member

@rayjsales Can you reproduce the issue if you follow those initial steps again? If you can, could you share your package.json and lockfile?

@rayjsales
Copy link
Author

Hi @kategengler - I followed the same initial steps on a fresh project and was able to reproduce the issue. Attached please find my package.json and lock file as requested.
package.json
package-lock.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants