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.

package.json is not copied to the build folder

See original GitHub issue

The package.json file is not copied to the build folder, but yet without it, the contents of the build folder can’t be deployed on a remote server, since you wouldn’t be able to recreate the node dependencies in node_modules. I suspect the best way to add it is to just add this to the build.js?

s.cp('package.json', 'build/package.json');

Or is there a better way, or am I missing something?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
chriszrccommented, May 10, 2018

Ok, thanks for clarifying!

On Thu, May 10, 2018 at 12:27 PM, Carmine DiMascio <notifications@github.com

wrote:

In that case, you could zip the contents with exclusions (usually the zip -x flag), then keeping package.json in its current location. (/public and /server are the directories to exclude, however you can also exclude some of the config files as well e.g. .babelrc etc, however they add marginal weight.

You can also do as you proposed, however the package.json in that you copy to build will require modifications to the start script.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cdimascio/generator-express-no-stress-typescript/issues/9#issuecomment-388106857, or mute the thread https://github.com/notifications/unsubscribe-auth/AYgWKepYZAmNar-CtJS_X-uzMb8okUbtks5txGpegaJpZM4T3HPy .

Chris Marx ZevRoss - Know Your Data Data Science & Spatial Analysis New website: www.zevross.com Ithaca, NY

0reactions
cdimasciocommented, May 10, 2018

closing this out, feel free to continue the discussion if needed

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to copy package.json in dist or build folder when running ...
json file (see screenshot) and I run tsc in order to transpile it to es5 in my dist folder but the package. json...
Read more >
Modify library package.json (do not copy to dist folder) #1229
package.json is copied from source folder to dist folder. Publish workflow is cd dist && npm publish. Expected Behaviour.
Read more >
Files still published when "Output directory" set to "Do not copy ...
js is always copied to the output folder when publishing. I would expect the "Output directory" and "Build action" properties to take priority...
Read more >
"copy-files" task | Rush Stack
json config file. When to use it​. This task is most commonly used to copy asset files such as fonts or images into...
Read more >
Copying missing files during a typescript build on deploy
I'm adding the script copyMySpecialFiles . This copies all the files in the folder to build. The --up 1 tells copyfiles not to...
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