Ember CLI ember new and ember init files not showing but buildable - ubuntu-14.04

I'm using ember v1.13.15, node: 5.4.1, npm 2.14.10 and os linux x64 (ubuntu). I'm actually trying to get ember-cli into my rails app. When executing ember new frontend I get the output that a bunch of files were created. These files don't show up in nautilus, terminal via ls nor can I cd into the directory. I manually typed mkdir frontend && cd frontend then ember init with the same results. If I run ember init again it recognizes the files are there because it asks me if I want to overwrite some files.
Running ember build produces a successful build, but where are the files?
Updated with terminal
uhoh#eblinux:~/Documents/apps/mvp$ cd frontendconsumer/
uhoh#eblinux:~/Documents/apps/mvp/frontendconsumer$ ls
uhoh#eblinux:~/Documents/apps/mvp/frontendconsumer$ ember init
version: 1.13.15
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
installing app
identical .bowerrc
identical .editorconfig
identical .ember-cli
identical .jshintrc
identical .travis.yml
identical .watchmanconfig
identical README.md
identical app/app.js
identical app/index.html
identical app/router.js
identical app/templates/application.hbs
identical bower.json
identical config/environment.js
identical ember-cli-build.js
identical .gitignore
identical package.json
identical public/crossdomain.xml
identical public/robots.txt
identical testem.json
identical tests/.jshintrc
identical tests/helpers/destroy-app.js
identical tests/helpers/module-for-acceptance.js
identical tests/helpers/resolver.js
identical tests/helpers/start-app.js
identical tests/index.html
identical tests/test-helper.js
Installed packages for tooling via npm.
Installed browser packages via Bower.
uhoh#eblinux:~/Documents/apps/mvp/frontendconsumer$ ls
uhoh#eblinux:~/Documents/apps/mvp/frontendconsumer$ ls -a
. ..
Update v2
uhoh#eblinux:~/Documents/apps/mvp/frontendconsumer$ locate test-helper.js --all
/home/uhoh/Documents/apps/integration/node_modules/jshint/node_modules/htmlparser2/test/test-helper.js
/home/uhoh/Documents/apps/newapp/node_modules/jshint/node_modules/htmlparser2/test/test-helper.js
/home/uhoh/Documents/apps/vd-integrations/test/test-helper.js
/home/uhoh/Downloads/ace1.3.1/mustache/js/node_modules/htmlparser2/tests/test-helper.js
/home/uhoh/Downloads/ace1_3.0/mustache/js/node_modules/htmlparser2/tests/test-helper.js
/home/uhoh/Downloads/ace3/mustache/js/node_modules/htmlparser2/tests/test-helper.js
/home/uhoh/consumer_frontend/node_modules/ember-cli/blueprints/app/files/tests/test-helper.js
/home/uhoh/consumer_frontend/node_modules/ember-cli-babel/tests/test-helper.js
/home/uhoh/consumer_frontend/node_modules/ember-cli-content-security-policy/tests/test-helper.js
/home/uhoh/consumer_frontend/node_modules/ember-cli-qunit/node_modules/broccoli-jshint/node_modules/jshint/node_modules/htmlparser2/test/test-helper.js

I am unable to comment, so instead I will offer you two main options:
Uninstall all ember related packages and push node to 5.6.0 and npm to 3.6.0 (the version that I using.)
npm uninstall -g ember-cli
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Install Ember and the needed packages, confirm version of node and npm and try to create the project.
Probe the files on the frontendconsumer folder:
Typesyncand see if something shows up on Nautilus.
Use locate test-helper.js -c or locate any other file that was supposed to be there. If the result is 0 then give the other locate params a try.
Type baobab and see if something shows up on the folder.
If nothing yet, then try find -type l to see if there are any symbolic links.
Run a checkdisk on your hard drive.
If none of those options helped, then something really weird is going when scaffolding the new application... If there is no other issues on your system, try to create a rails app through RVM to see if the scaffold of a new app works out. If it does, then chances are that something within npm, node or the ember packages are bad. Otherwise, it may be your system.

Related

Facing error while installing npm in react

I want to make a react project but when I execute npx create-react-app, it doesn't respond. Can anyone tell me what the issue I am facing here is? Screenshot.
make an empty folder then drag it over VSC, and type in terminal: npx create-react-app . (dot means in the current folder) also make sure u have node installed, type: node -v (to check what version u have)
From the official ReactJS Docs:
You’ll need to have Node >= 14.0.0 and npm >= 5.6 on your machine. To create a project, run:
npx create-react-app my-app
cd my-app
npm start
In the screenshot you provided, you indeed ran the command; but, it doesn’t show that you checked that the directory, visual, was created within your working directory, New folder. In addition, no error message was output; so as it stands, we know the npx command exists; and can only assume that, the command executed without error.
When using create-react-app:
A new directory will be created in the working directory (in your case, New folder) you run the command within.
This new directory will have the name of the argument you provided to create-react-app (in your case, visual).
So your directory structure you look like this:
New folder/
└─ visual/
The issue I see is that, the general output normally seen when running create-react-app (as shown here) did not appear in your screenshot; however, I’ve never ran it from MS PowerShell, as you appear to be. So you’ll want to check:
That you’re not overthinking this, and ensure that the, my-app, folder really wasn’t created;
And that your NodeJS version is either 14.0.0 or higher:
node -v
And that create-react-app was not installed globally:
To check this, run:
npm list -g
If you see create-react-app in the list, run:
npm uninstall -g create-react-app
npm install create-react-app
Or that running it from cmd (or cygwin) instead of powershell is maybe the better option.

NodeJS - npm install practice

Created new folder and did npm install serve in it.
It created package-lock.json and node_modules/ folder.
When I run in the same folder serve it shows error:
command not found: serve
What is the way to install?
I am using: npm#6.5.0
My dev environment is MACOS
I read a great many pages on this topic and nothing worked until I tried the following
./node_modules/.bin/serve -s build
Also if you are using VS CODE you may want to bring up the terminal window outside of VS CODE - this seems to have snared a lot of people.
First of all, you should start your project running
npm init
This will create the package.json file.
Then, you can install the serve package globally.
npm install -g serve
And now you can run serve.
The serve binary was not found because the operating system cannot locate it in the PATH environment variable.
When you do the npm install serve command. The serve module is only installed into the node_modules directory found under the the project folder. Unless you explicitly include the absolute path of this node_module directory as part of your PATH env var, the OS won't know where to find serve.
Like others say, the typical practise would be to install the module using the -g flag. G means global.
When -g is used, npm will put the binary in its node directory somewhere and this this directory would have been included as part of your PATH when you install node, thus making the any new binary discoverable.
If the node.js module has a "command" and you want to run it without installing the module globally(npm install -g serve). You can run it like ./node-modules/.bin/command from the root folder of the project.
Now, what is generally used is npx, so that you can from within a project easily run any of the binaries within its local node_modules or your system's global node_modules/ and any other commands on the $PATH.
For example, here we install webpack as a local dependency. You can image doing this in a folder after running npm init. Then we run webpack without having to worry about referencing the bin file:
$ npm i -D webpack
$ npx webpack

File Structure MEAN .IO After mean init MyApp

After setting up node bower grunt and mean I run mean init myApp which prepares me a new project. At that point I go into the app and run
npm install
After my project is installed I can run the app with no problems and everything looks great. But the amount of files and folders is a bit overwhelming. I have searched for a tutorial explaining the file paths but can't find one that matches my current build after following those commands right off of the mean.io website.
$ sudo npm install -g mean-cli
$ mean init yourNewApp
Someone please provide me with some documentation to read through to understand what's being installed following those commands and how to weed through it to understand how to start working with mean.io
The file structure is int he picture below.
Config is for env-based and global configuration.
Gulp is the gulp scripts for running \ updating \ minifying
Logs contain the application's logs
node_modules contain npm dependencies (standard)
Packages contain core and custom packages
Tests contain the test configuration files
Tools contain general scripts like npm's postinstall actions (for example, propagating bower install to all packages)
The documentation describes the folder structure for packages (which is almost the only interesting folder in terms of functionality development):
Also, John Webb has a couple of useful mean.io video tutorials which might help you find your way around mean.io:
Getting Started
Customization

npm install without symlinks option not working

I setup a development environment with Windows 8 and Ubuntu as a virtual machine. For that I use VirtualBox.
I also manage to create a shared folder in VirtualBox.
In this shared folder I try to start a project with ember-generator of Yeoman.
yo ember --skip-install --karma
npm install --no-bin-links
For installing modules NPM I use the option "--no-bin-links" not to create symbolic links. Unfortunately, I still have errors creations symbolic links ... Is what I use although this option ? There he has a bug ?
The NPM docs about parameter "--no-bin-links" say:
will prevent npm from creating symlinks for any binaries the package
might contain.
Which will just cause NPM to not create links in the node_modules/.bin folder. I also searched for a way to prevent NPM from creating symlinks when using npm install ../myPackage, but can't find any solution...
Update: The npm support team said this will reproduce the old behaviour (no symbolic links):
npm install $(npm pack <folder> | tail -1)
Works for me in git-bash on Windows 10.
This Stack Overflow page comes up in Google search results when trying to solve the issue of installing local modules (ie. npm install ../myPackage) and not wanting symbolic links. So I'm adding this answer below to help others who end up here.
Solution #1 - For development environment.
Using the solution proposed by the NPM support team as mentioned in the other answer works...
# Reproduces the old behavior of hard copies and not symlinks
npm install $(npm pack <folder> | tail -1)
This is fine in the development environment for manual installs.
Solution #2 - For build environment.
However, in our case, the development environment doesn't quite matter as much though because when committing our changes to Git, the ./node_modules/ folder is ignored anyway.
The files ./package.json and ./package-lock.json is what is important and is carried into our build environment.
In our build environment (part of our automated CI/CD pipeline), the automation just runs the npm install command and builds from the dependencies listed in the package.json file.
So, here is where the problem affects us. The locally referenced files in the dependencies list of the package.json causes symlinks to appear. Now we are back to the old problem. These symlinks then get carried into the build's output which move onto the Stage and Production environments.
What we did instead is use rsync in archive mode with the --copy-links option that turns symbolic links into copies of the original.
Here is what the command looks like in the automated build:
# Install dependencies based on ./package.json
npm install
# Make a copy that changes symlinks to hard copies
rsync --archive --verbose --copy-links ./node_modules/ ./node_modules_cp/
# Remove and replace
rm -r ./node_modules/
mv ./node_modules_cp/ ./node_modules/
I have a similar environment. Apparently the Virtualbox (vagrant) synchronisation has problems when renaming or moving files, which happens when updating modules.
If you do a file listing (ls -alhp) on the command line and see ??? for the file permissions, then it is time to reboot your virtualbox. This will set the permissions to valid values. Then use the --no-bin-links option when installing a module.

node.js zip utilities that works with node-webkit?

Has anyone been able to successfully create a zip file that can be read by node-webkit using any of the node.js zip utility?
I have tried node-zip, admzip, node-archiever, etc. but havent' had much luck. For one reason or another, none of the files can be read by node-webkit (and sometimes by, say, winzip as well)
Try to package your app with the tools provided by the Yeoman Generator: https://www.npmjs.org/package/generator-node-webkit
$ npm install -g yo
$ npm install -g generator-node-webkit
$ yo node-webkit
Then, put your code inside the app folder and run one of these:
grunt dist-mac
grunt dist-win
grunt dist-linux
This will package your app and leave the executable on the dist folder.

Resources