Running `npm init rust-webpack my-app` yields an unexpected result
See original GitHub issueDescribe the Bug
Running npm init
with rust-webpack
yields a directory which is not what I expected.
Steps to Reproduce
- Run
npm init rust-webpack my-app
- List directory
ls -la my-app
- Notice that this is not the template directory as expected.
Expected Behavior
When I init from rust-webpack
I expect the newly created directory to have the contents of the template
directory.
Actual Behavior
Running the npm init
command with rust-webpack
npm init rust-webpack my-app
gives me the following my-app
directory
drwxr-xr-x 13 kraenhansen staff 416 19 Jun 16:27 .
drwxr-xr-x 77 kraenhansen staff 2464 19 Jun 16:27 ..
drwxr-xr-x 3 kraenhansen staff 96 19 Jun 16:27 .bin
drwxr-xr-x 12 kraenhansen staff 384 19 Jun 16:27 .git
-rw-r--r-- 1 kraenhansen staff 82 19 Jun 16:27 .gitignore
-rw-r--r-- 1 kraenhansen staff 314 19 Jun 16:27 .travis.yml
-rw-r--r-- 1 kraenhansen staff 10847 19 Jun 16:27 LICENSE-APACHE
-rw-r--r-- 1 kraenhansen staff 1071 19 Jun 16:27 LICENSE-MIT
-rw-r--r-- 1 kraenhansen staff 1849 19 Jun 16:27 README.md
drwxr-xr-x 19 kraenhansen staff 608 19 Jun 16:27 node_modules
-rw-r--r-- 1 kraenhansen staff 4410 19 Jun 16:27 package-lock.json
-rw-r--r-- 1 kraenhansen staff 362 19 Jun 16:27 package.json
drwxr-xr-x 11 kraenhansen staff 352 19 Jun 16:27 template
Additional Context
As a comparison, calling npm init
with react-app
yields a directory with only the files needed to build an app (try running npm init react-app my-react-app
).
I believe this is happening because https://github.com/rustwasm/rust-webpack-template/pull/144 changes the structure of the repository and a release has not been made quickly thereafter. It would be awesome if this got released very soon as it’s super confusing for a newcomer.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Unexpected token '.' when trying to run 'npm install'
Based on the github issue link, the fix is to upgrade nvm for windows to 1.1.10, and then remove (all?) node version and...
Read more >npm-init | npm Docs
initializer in this case is an npm package named create-<initializer> , which will be installed by npm-exec , and then have its main...
Read more >Create a New Rust/Webpack Project using the ... - Egghead.io
We start by creating a new directory, myApp. Inside it, we run npm init rust -webpack. [00:18] This will copy the template into...
Read more >Setting up a Node development environment - MDN Web Docs
You now have a Node development environment up and running on your ... Now install Express in the myapp directory and save it...
Read more >6 reasons your Node.js apps are failing - IBM Developer
Common Node.js deployment problems · Uncaught exception or error event in JavaScript code · Excessive memory usage, which may result in an out-of-memory...
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 Free
Top 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
Published a new version and this should be fixed! Thanks for filing an issue!
Indeed, I’m a newcomer and got super confused.
For newcomers like me, you can work around this by running this code until the new version gets released.