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.

Run npm build or npm start after initial setup?

See original GitHub issue

The init script tells the user to run npm build https://github.com/forestryio/create-static-site/blob/43c3eaf5a003e8ffd640746e3bd93a90d5ad3cc9/packages/static-scripts/scripts/init.js#L187

If you look at the ReadMe file, there is information about npm start and npm build. https://github.com/forestryio/create-static-site/blob/master/README.md#npm-start-or-yarn-start

If I run npm build, nothing happens and I get the following warning in return. npm WARN build 'npm build' called with no arguments. Did you mean to 'npm run-script build'?

If I run npm start, then the system builds and hosts the site as expected.

I would recommend changing line 187 linked above to npm start instead of build, or add the missing parameters that seem to be required to run the build process.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ncphillipscommented, Mar 9, 2018

this issue will be closed by #41

1reaction
ncphillipscommented, Mar 1, 2018

@zivbk1 that’s not quite the change we would be looking for in this case. The convention of yarn is to not use run. Instead it would look something like:

  console.log(chalk.cyan(`  ${displayedCommand} ${useYarn ? "" : "run "}build`))

As seen a few lines up

Open the PR and I’ll attach it to the 0.1.2 release of static-scripts

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm-start - npm Docs
This runs a predefined command specified in the "start" property of a package's "scripts" object. If the "scripts" object does not define a...
Read more >
Difference between npm start and npm run start - Stack Overflow
I have checked both commands npm start and npm run start , both works perfectly. I used create-react-app. But to make configuration changes ......
Read more >
Creating an Npm-Only Build Step for JavaScript — the Easy Way
Let's Build an Npm-only Script · Run a node server that watches for file changes · Compile Sass to CSS and revision the...
Read more >
Introduction to Using NPM as a Build Tool - Medium
In your terminal, run the following command: npm run test. What does “npm run” do? It is a shortcut for “npm run-script”.
Read more >
How to NPM Start for React Tutorial Project | Pluralsight
Introduction · Installing create-react-app · Create a New React App · What Does package. · Build and Run Our App.
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