Git Product home page Git Product logo

Comments (9)

magdalenagorecka avatar magdalenagorecka commented on July 20, 2024 1

The issue is with .babelrc When I changed it to babel-recommended

{"presets": [
  ["env", {
    "targets": {
      "node": "current"}
  }]
]
}

it worked just fine.

from javascript-development-environment.

coryhouse avatar coryhouse commented on July 20, 2024

Please review this list: https://github.com/coryhouse/javascript-development-environment#having-issues-try-these-things-first

Also, I'm unclear what command you're running.

Does the final course exercise posted on the course page under "exercise files" work for you? (check the final module folder)

from javascript-development-environment.

coryhouse avatar coryhouse commented on July 20, 2024

@magdalenagorecka If that worked for you, then you're running babel-preset-env instead. Yes, that also works, and is the new standard, but in the course I used babel-preset-latest.

from javascript-development-environment.

instacode-AU avatar instacode-AU commented on July 20, 2024

The issue is when i run "npm start", looks like the issue is with the babel node references. I have downloaded the final version and that works fine, I'll run a comparison between the files and report back on my findings. Thanks for your assistance @coryhouse and @magdalenagorecka

from javascript-development-environment.

yagomassiah avatar yagomassiah commented on July 20, 2024

While I ran into the same problem, my solution was actually using the vscode auto repair for the ES6 module declaration, we had
var chalk = require('chalk');

@coryhouse suggested we used:

var chalk = require('chalk');

That didn't work out so I used the vscode suggestion:

import { green } from 'chalk';

And that worket out just fine, (we we're using console.log(green()) just below).

Can someone explain to me why can't I just import just chalk?

from javascript-development-environment.

coryhouse avatar coryhouse commented on July 20, 2024

@yagomassiah - As shown in the chalk docs, If you import chalk as

import chalk from chalk;

Then you must consume it as

chalk.green('green message here')

from javascript-development-environment.

patkarkaustubh avatar patkarkaustubh commented on July 20, 2024

Hello cory,
I am facing the following error. Can you please help me out for the same?

internal/modules/cjs/loader.js:583
throw err;
^

Error: Cannot find module '/Users/kaustubhpatkar/WebstormProjects/MyReactApp/tools/startMessage.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at Object. (/Users/kaustubhpatkar/WebstormProjects/MyReactApp/node_modules/babel-cli/lib/_babel-node.js:154:22)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)

from javascript-development-environment.

coryhouse avatar coryhouse commented on July 20, 2024

Can you please post on the course discussion instead? That said, it looks like the path to startMessage is incorrect.

from javascript-development-environment.

M-Tee avatar M-Tee commented on July 20, 2024

The issue is with .babelrc When I changed it to babel-recommended

{"presets": [
  ["env", {
    "targets": {
      "node": "current"}
  }]
]
}

it worked just fine.

This worked for me though I had to replace "env" with "@babel/env"

from javascript-development-environment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.