question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JavaScript sample app does not build

See original GitHub issue

🐛 Bug Report

What is the problem?

The default JavaScript project does not build. (TypeScript works just fine with the same steps.)

Reproduction Steps

➜  intro-to-lambda git:(master) ✗ mkdir MyJavaScriptExample
➜  intro-to-lambda git:(master) ✗ cd MyJavaScriptExample
➜  MyJavaScriptExample git:(master) ✗ cdk init --language javascript
Applying project template app for javascript
Executing npm install...
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN my_java_script_example@0.1.0 No repository field.
npm WARN my_java_script_example@0.1.0 No license field.

# Useful commands

 * `npm run test`         check javascript error using the typescript compiler
 * `npm run test:watch`   watch for changes and check javascript error using the typescript compiler
 * `cdk deploy`           deploy this stack to your default AWS account/region
 * `cdk diff`             compare deployed stack with current state
 * `cdk synth`            emits the synthesized CloudFormation template

➜  MyJavaScriptExample git:(master) ✗ npm run build
npm ERR! missing script: build

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jkodroff/.npm/_logs/2019-09-10T21_44_42_437Z-debug.log

Verbose Log

Environment

  • CDK CLI Version: 1.7.0
  • Module Version: n/a
  • OS: OSX
  • Language: JavaScript

Other information

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jogoldcommented, Sep 11, 2019

There is no need to build when using JavaScript, you can proceed with cdk commands directly.

The build step in TypeScript compiles to JavaScript.

0reactions
shivlakscommented, Sep 28, 2019

@jkodroff @skinny85 the return code will implicitly be 0 (i.e. echo $? will show that the last command returned a 0) with just the echo, but how about I just make it more explicit anyways:

"echo \"The build step is not required when using Javascript!\" && exit 0"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pure JavaScript — Building A Real-World Application From ...
This tutorial guides you through building a web application in pure JavaScript step-by-step.
Read more >
Build your first plain JavaScript app | Kontent.ai Learn
This tutorial guide you through building a simple blog using plain JavaScript with all of the content stored in Kontent.ai. You won't need ......
Read more >
I am getting error in console "You need to enable JavaScript to ...
If you have built the app, it means the build process probably stripped out the dev-server. So you need a way to run...
Read more >
5 ways to build real-time apps with JavaScript - freeCodeCamp
Kind of like you could make an HTTP request with the XHR object, but OMG NO. I Googled “PHP Web Socket Sample” and...
Read more >
10 Things You Can Build with JavaScript - Grand Circus
10. Flying Robots: · 9. Mobile Apps: · 8. Programming Puzzles: · 7. Art: · 6. Presentations: · 5. Games: · 4. Web...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found