Comments (9)
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.
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.
@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.
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.
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.
@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.
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.
Can you please post on the course discussion instead? That said, it looks like the path to startMessage is incorrect.
from javascript-development-environment.
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)
- npm test error HOT 1
- Pluralsight: Bundling - Demo Create App Entry Point HOT 5
- Getting unhandled error event on npm start HOT 1
- Error: Running babel-node HOT 1
- Demo doesn't run in Internet Explorer
- dynamic html generation problem with webpack 3 HOT 1
- Module 4: nsp - but Node Security Platform service is shutting down 9/30 2018 HOT 10
- Tweak list
- update devDependencies List/Table in README HOT 1
- security-check fails HOT 6
- Webpack 4 Issues with config.prod.js HOT 2
- Error with nsp check, HOT 1
- Getting TypeError: results.forEach is not a function
- distServer.js and compression order doesn't work for me unless swapped HOT 1
- embeddedjs.com is dead
- Switch to latest Heroku stack
- Run the versions I specify in the course HOT 1
- branch update-2019 README: add description how to merge with master. dotfiles gone HOT 2
- node_modules\open\lib\open.js:62 return s.replace(/"/g, '\\\"'); TypeError: s.replace is not a function HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript-development-environment.