node.js sample from node devfile contains node_modules in the source code
See original GitHub issueDescribe the bug
node.js sample from node devfile(https://github.com/eclipse/che-devfile-registry/blob/master/devfiles/nodejs/devfile.yaml#L10) contains node_modules folder in the source code It’s looks strange . In most case node developers exclude such folder from source code and use package.lock.json or yarn.lock to freeze transitive dependencies, or to use transitive dependencies without security vulnerabilities.
Che version
- latest
- nightly
- other: please specify
Steps to reproduce
- Create new workspace from node devfile “NodeJS Express Web Application”
- Open source code project nodejs-web-app
Expected behavior
Sample should has node_modules excluded in the .gitignore file and we should have a command in the devfile to get node dependencies (‘npm install’) or ‘npm install’ should be embedded to the application start devfile command.
Runtime
- kubernetes (include output of
kubectl version
) - Openshift (include output of
oc version
) - minikube (include output of
minikube version
andkubectl version
) - minishift (include output of
minishift version
andoc version
) - docker-desktop + K8S (include output of
docker version
andkubectl version
) - other: (please specify)
Screenshots
Installation method
- chectl
- che-operator
- minishift-addon
- I don’t know
Environment
- my computer
- Windows
- Linux
- macOS
- Cloud
- Amazon
- Azure
- GCE
- other (please specify)
- other: please specify
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
node/modules.md at main · nodejs/node - GitHub
Node.js has two module systems: CommonJS modules and ECMAScript modules. ... include the "type" field, even in packages where all sources are CommonJS....
Read more >How To Use Node.js Modules with npm and package.json
We begin this tutorial by setting up the example project—a fictional Node.js locator module that gets the user's IP address and returns the ......
Read more >How to include scripts located inside the node_modules folder?
If you were using express with nodejs, a static route is as simple as this: app.use('/scripts', express.static(__dirname + '/node_modules/bootstrap/dist/'));.
Read more >Modules: Packages | Node.js v19.3.0 Documentation
The package consists of the folder containing the package.json file and all ... include the "type" field, even in packages where all sources...
Read more >Set Up a GitHub Project with node_module - Pluralsight
The npx command is bundled with the node.js package, and, apart from npx ... A node_modules directory contains all the React dependencies ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is useful, but I don’t think it is high priority, but as it’s something fairly quick to handle we could take it.
@slemeur I believe we could remove
node_modules
since we own the repo, I was planning on opening a PR for that and other changes to sample projects at some point (e.g. the web-java-spring sample project readme is out of date.Do you think cleaning up sample projects is something useful for 7.0.0?