hashnode / mern-cli Goto Github PK
View Code? Open in Web Editor NEW⛔️ DEPRECATED - A cli tool for getting started with MERN
Home Page: http://mern.io/
License: MIT License
⛔️ DEPRECATED - A cli tool for getting started with MERN
Home Page: http://mern.io/
License: MIT License
HI @mayankchd & @prank7
Are you open to using vorpal.js? I am currently playing around with this and thought it would be great to use this with mern-cli.
Are you okay with this for future pr?
When running mern info mern-starter
on OSX (Darwin Kernel Version 15.4.0), the output is truncated down to (direct paste from terminal, excuse the formatting).
Adams-MBP:mern-starter adam$ mern info mern-starter ┌─────────────┬─────────────────────────────────────────────────┐ │ Name │ mern-starter │ ├─────────────┼─────────────────────────────────────────────────┤ │ Description │ Default Mern Starter │ ├─────────────┼─────────────────────────────────────────────────┤ │ Author │ Hashnode │ ├─────────────┼────?Adams-MBP:mern-starter adam$
It also throws off my Terminal coloring. And moves the cursor to the middle of the term. Not sure if this is systemic, or just something weird I have in my .bash_profile or what. I know there are supposed to be 3 more rows displayed (and more when more projects get added). I have a bugfix (not checked in) on a local fork using https://github.com/flatiron/cliff over cli-table if you want me to submit a PR.
There have been requests to add specific features into mern-starter which is required by few people or not suitable for beginners. So, we are thinking to have mern-cli clone variants of MERN project with those specific features. It can look something like this,
mern list
can output something like this
Available variants
--------------------------
passport-auth - MERN with passport.js
jwt-auth - MERN with JWT auth
redux-saga - MERN with redux-saga
You can clone a particular variant using
mern newApp passport-auth
This is a rough idea, we can further discuss on how to make it possible.
React component involves a lot of boilerplate. So, it'll be great if the next release supports creation of new components as specified by the user.
Optionally the user may be asked whether he require functional or a class based component.
I would like to work on this 😄
When i run merng, it produces the following error-
user@mypc:~/Documents/node_modules/mern-cli/urapp$ node ../bin/merng.js
Usage: merng [options] <generator> [args]
Generate components, routes, controllers, models using mern generator
Options:
-h, --help output usage information
Available Generators
____________________
/home/user/Documents/node_modules/mern-cli/lib/commands/generate.js:43
blueprints.forEach(function (b) {
^
TypeError: Cannot read property 'forEach' of undefined
at Command.<anonymous> (/home/user/Documents/node_modules/mern-cli/lib/commands/generate.js:43:16)
at emitNone (events.js:106:13)
at Command.emit (events.js:208:7)
at Command.outputHelp (/home/user/Documents/node_modules/commander/index.js:1146:8)
at Command.help (/home/user/Documents/node_modules/commander/index.js:1156:8)
at Object.<anonymous> (/home/user/Documents/node_modules/mern-cli/lib/commands/generate.js:49:25)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
I am running merng locally here, is that why this error is occuring?
error stack from npm-debug.log
5 verbose addRemoteGit caching github:timoxley/next-tick#0.0.2
626 verbose addRemoteGit timoxley/next-tick#0.0.2 is a repository hosted by github
627 silly tryGitProto attempting to clone git://github.com/timoxley/next-tick.git#0.0.2
628 silly tryClone cloning timoxley/next-tick#0.0.2 via git://github.com/timoxley/next-tick.git#0.0.2
629 verbose tryClone git-github-com-timoxley-next-tick-git-0-0-2-636565fd not in flight; caching
630 verbose correctMkdir /Users/dw/.npm/_git-remotes correctMkdir not in flight; initializing
631 info git [ 'config', '--get', 'remote.origin.url' ]
632 verbose stack TypeError: Bad argument
632 verbose stack at ChildProcess.spawn (internal/child_process.js:289:26)
632 verbose stack at exports.spawn (child_process.js:385:9)
632 verbose stack at exports.execFile (child_process.js:148:15)
632 verbose stack at execGit (/usr/local/lib/node_modules/npm/lib/utils/git.js:23:10)
632 verbose stack at /usr/local/lib/node_modules/npm/lib/utils/git.js:45:5
632 verbose stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:88:20
632 verbose stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
632 verbose stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
632 verbose stack at FSReqWrap.oncomplete (fs.js:111:15)
633 verbose cwd /Users/dw/Workspace/me
634 error Darwin 15.6.0
635 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "mern-cli"
636 error node v7.0.0
637 error npm v3.10.8
638 error Bad argument
639 error If you need help, you may report this error at:
639 error <https://github.com/npm/npm/issues>
640 verbose exit [ 1, true ]
When installing mern-cli
via Yarn, the package successfully installs
yet am unable to run any of the CLI commands.
The same issue has been found with the vue-cli
package and documented in the following issues:
vuejs/vue-cli#193 and vuejs/vue-cli#205
The issue was resolved in the following respective PR: vuejs/vue-cli#206
I am accompanying this issue with a proposed PR (#22) that resolves the issue similarly to the the vue-cli
solution and would like your feedback on whether this would be an appropriate solution for mern-cli
.
Below is a comparison of installing the package via Yarn
and NPM
followed by my environment details.
Yarn install process:
___________________________________________________
~/Sites 9:38 AM
=> yarn global add mern-cli
yarn global v0.18.1
warning No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Installed [email protected] with binaries:
- mern
- merng
warning No license field
✨ Done in 25.01s.
___________________________________________________
~/Sites 9:38 AM
=> mern init myApp
mern-init(1) does not exist, try --help
___________________________________________________
~/Sites 9:39 AM
=> mern list
mern-list(1) does not exist, try --help
___________________________________________________
~/Sites 9:39 AM
=> mern search starter
mern-search(1) does not exist, try --help
___________________________________________________
~/Sites 9:39 AM
=> mern info
mern-info(1) does not exist, try --help
___________________________________________________
~/Sites 9:40 AM
=> mern --help
Usage: mern [options] [command]
Commands:
init [name] Initialize a MERN project.
list List MERN variants
search [term] Search for MERN variant
info [term] View details of a MERN variant
help [cmd] display help for [cmd]
Initialize a MERN powered project
Options:
-h, --help output usage information
-V, --version output the version number
-v, --version check version
NPM install attempt:
___________________________________________________
~/Sites 10:43 AM
=> npm install -g mern-cli
> [email protected] prepublish /Users/patrick/Sites/mern-cli
> npm run compile
> [email protected] compile /Users/patrick/Sites/mern-cli
> babel --presets es2015,stage-0 -d lib/ src/
src/commands/generate.js -> lib/commands/generate.js
src/commands/main-info.js -> lib/commands/main-info.js
src/commands/main-init.js -> lib/commands/main-init.js
src/commands/main-list.js -> lib/commands/main-list.js
src/commands/main-search.js -> lib/commands/main-search.js
src/commands/main.js -> lib/commands/main.js
src/tasks/generate.js -> lib/tasks/generate.js
src/tasks/getMernConfig.js -> lib/tasks/getMernConfig.js
src/tasks/readAndRenderTemplate.js -> lib/tasks/readAndRenderTemplate.js
src/tasks/renderTargetPath.js -> lib/tasks/renderTargetPath.js
src/util/ejsHelpers.js -> lib/util/ejsHelpers.js
src/util/fileExists.js -> lib/util/fileExists.js
src/util/ui.js -> lib/util/ui.js
/Users/patrick/.nvm/versions/node/v6.9.1/bin/mern-init -> /Users/patrick/.nvm/versions/node/v6.9.1/lib/node_modules/mern-cli/bin/mern-init.js
/Users/patrick/.nvm/versions/node/v6.9.1/bin/mern-list -> /Users/patrick/.nvm/versions/node/v6.9.1/lib/node_modules/mern-cli/bin/mern-list.js
/Users/patrick/.nvm/versions/node/v6.9.1/bin/mern-info -> /Users/patrick/.nvm/versions/node/v6.9.1/lib/node_modules/mern-cli/bin/mern-info.js
/Users/patrick/.nvm/versions/node/v6.9.1/bin/mern-search -> /Users/patrick/.nvm/versions/node/v6.9.1/lib/node_modules/mern-cli/bin/mern-search.js
/Users/patrick/.nvm/versions/node/v6.9.1/bin/merng -> /Users/patrick/.nvm/versions/node/v6.9.1/lib/node_modules/mern-cli/bin/merng.js
/Users/patrick/.nvm/versions/node/v6.9.1/bin/mern -> /Users/patrick/.nvm/versions/node/v6.9.1/lib/node_modules/mern-cli/bin/mern.js
/Users/patrick/.nvm/versions/node/v6.9.1/lib
└─┬ [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected] (git://github.com/timoxley/next-tick.git#6f25f8c2d25697dead7e49e978ae4c31703f7490)
├─┬ [email protected]
│ └── [email protected]
└── [email protected]
___________________________________________________
~/Sites 10:43 AM
=> mern init myApp
Initialized empty Git repository in /Users/patrick/Sites/myApp/.git/
Fetching the boilerplate...⠋
From https://github.com/Hashnode/mern-starter
Completed.....You are good to go!
___________________________________________________
~/Sites 10:44 AM
=> mern-list
MERN Variants
-------------
┌──────────────┬──────────────────────┬──────────┐
│ Name │ Description │ Author │
├──────────────┼──────────────────────┼──────────┤
│ mern-starter │ Default Mern Starter │ Hashnode │
└──────────────┴──────────────────────┴──────────┘
For more info, execute "mern info <variant_name>"
___________________________________________________
~/Sites 10:45 AM
=> mern search starter
Search results for starter
-------------
┌──────────────┬──────────────────────┬──────────┐
│ Name │ Description │ Author │
├──────────────┼──────────────────────┼──────────┤
│ mern-starter │ Default Mern Starter │ Hashnode │
└──────────────┴──────────────────────┴──────────┘
For more info, execute "mern info <variant_name>"
___________________________________________________
~/Sites 10:45 AM
=> mern info
Usage: mern-info [options]
Options:
-h, --help output usage information
___________________________________________________
~/Sites 10:45 AM
=> mern --help
Usage: mern [options] [command]
Commands:
init [name] Initialize a MERN project.
list List MERN variants
search [term] Search for MERN variant
info [term] View details of a MERN variant
help [cmd] display help for [cmd]
Initialize a MERN powered project
Options:
-h, --help output usage information
-V, --version output the version number
-v, --version check version
Environment Details:
Node version: v6.9.1
Yarn version: v0.18.1
mern-cli version: v3.0
OS: macOS Sierra / 10.12.2
I just tried the fist steps to create an application given in the project's website and when I run npm install
I got some warns:
npm WARN [email protected] requires a peer of webpack@>=1.12.9 <3.0.0 but none was installed.
npm WARN [email protected] requires a peer of webpack@^1.4.0-beta6 but none was installed.
npm WARN [email protected] requires a peer of webpack@^1.9.11 but none was installed.
After that I tried npm start
:
Error: C:/.../my_app/client/modules/App/App.js: Command failed: node C\:\\...\\my_app\\node_modules\\webpack\\bin\\webpack.js C\:\\...\\my_app\\client\\modules\\App\\App.css C\:\\...\\AppData\\Local\\Temp\\.webpack.res.1466572316905_525303.js --config ./webpack.config.babel.js --bail
module.js:442
throw err;
^
Error: Cannot find module 'C\:\...\my_app\node_modules\webpack\bin\webpack.js'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Function.Module.runMain (module.js:575:10)
at startup (node.js:160:18)
at node.js:449:3
at checkExecSyncError (child_process.js:475:13)
at execSync (child_process.js:515:13)
at exports.default (C:\...\my_app\node_modules\babel-plugin-webpack-loaders\lib\runWebPackSync.js:41:51)
at PluginPass.CallExpression (C:\...\my_app\node_modules\babel-plugin-webpack-loaders\lib\plugin.js:93:60)
at newFn (C:\...\my_app\node_modules\babel-traverse\lib\visitors.js:301:19)
at NodePath._call (C:\...\my_app\node_modules\babel-traverse\lib\path\context.js:76:18)
at NodePath.call (C:\...\my_app\node_modules\babel-traverse\lib\path\context.js:48:17)
at NodePath.visit (C:\...\my_app\node_modules\babel-traverse\lib\path\context.js:106:12)
at TraversalContext.visitQueue (C:\...\my_app\node_modules\babel-traverse\lib\context.js:167:16)
at TraversalContext.visitSingle (C:\...\my_app\node_modules\babel-traverse\lib\context.js:118:19)
at TraversalContext.visit (C:\...\my_app\node_modules\babel-traverse\lib\context.js:211:19)
at Function.traverse.node (C:\...\my_app\node_modules\babel-traverse\lib\index.js:161:17)
at NodePath.visit (C:\...\my_app\node_modules\babel-traverse\lib\path\context.js:116:19)
at TraversalContext.visitQueue (C:\...\my_app\node_modules\babel-traverse\lib\context.js:167:16)
at TraversalContext.visitMultiple (C:\...\my_app\node_modules\babel-traverse\lib\context.js:113:17)
at TraversalContext.visit (C:\...\my_app\node_modules\babel-traverse\lib\context.js:209:19)
at Function.traverse.node (C:\...\my_app\node_modules\babel-traverse\lib\index.js:161:17)
The same happens cloning the mern-starter project.
Node 6.2.0
npm 3.8.9
MongoDB 2.6.6
I was wondering if this project is still maintained and developed at all?
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of webpack@^1.4.0-beta6 but none was installed.
npm WARN [email protected] requires a peer of webpack@>=1.12.9 <3.0.0 but none was installed.
npm WARN [email protected] requires a peer of webpack@^1.9.11 but none was installed.
npm ERR! Linux 3.13.0-88-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.3.0
npm ERR! npm v3.10.3
npm ERR! path /test-app/your_new_app/node_modules/nyc/node_modules/foreground-child/node_modules/which/bin/which
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/test-app/your_new_app/node_modules/nyc/node_modules/foreground-child/node_modules/which/bin/which'
npm ERR! enoent ENOENT: no such file or directory, chmod '/test-app/your_new_app/node_modules/nyc/node_modules/foreground-child/node_modules/which/bin/which'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
I think we shouldn't force users to install any global package.
The mern-cli should accept '.' as a parameter or a folder name like it is.
When using '.' mern-cli should execute git init
and git pull
in the current directory.
Thoughts?
The mern blog post works the first time after I give the command non run start. But after any changes I get this error. "Localhost" doesn't work to connect to mongodb on my system so I use "127.0.0.1". And after I do this, I get the above error, also in cases where I install any new dpendecy like socket.io or bluebird (mongoclient). Please any suggestions, because I follow the commands as specified in the docs
I think it is a good idea to show warning to any other commands other than what is available.
For instance, if the user makes a typo mern inis
instead of mern init
as per now there is no message being shown.
A warning might be suitable here such as unknown command inis
Mern can't fetch from remote because git doesn't specify the branch.
$ mern helloworld
Initialized empty Git repository in C:/Users/Alex_2/Documents/GitHub/helloworld/.git/
Fetching the boilerplate...|
From https://github.com/Hashnode/mern-starter
Fetching the boilerplate.../
Fetching the boilerplate...\
You asked to pull from the remote 'https://github.com/Hashnode/mern-starter.git', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
Error! Try again
I'm know this issue its related to nvm but i would like to know why is this happening with this actual version of mern-cli, i never had this issue before, any solution?
PS: I dont really want to use sudo npm install -g mern-cli
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/xxx/.nvm/versions/node/v6.2.0/bin/node" "/Users/xxx/.nvm/versions/node/v6.2.0/bin/npm" "install" "-g" "mern-cli"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! path /Users/xxx/.nvm/versions/node/v6.2.0/bin/mern
npm ERR! code EEXIST
npm ERR! Refusing to delete /Users/xxx/.nvm/versions/node/v6.2.0/bin/mern: ../lib/node_modules/mern-cli/bin/init.js symlink target is not controlled by npm /Users/xxx/.nvm/versions/node/v6.2.0
npm ERR! File exists: /Users/xxx/.nvm/versions/node/v6.2.0/bin/mern
npm ERR! Move it away, and try again.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/xxx/Desktop/react/ToursProject/npm-debug.log
This issue is just to request for handling or inviting developers for migrating the code base to typescript.
Benefits
My approach planning
We can start the migrating in a separate branch
The migration can start with moving the tests to typescript
I would appreciate hearing back from the team for this.
Presently, mern init
doesn't warn if the user gives in special characters for the ProjectName
.
It should follow the npm package naming conventions.
[nodemon] watching 14 files
MERN is running on port: 8000! Build something amazing!
Please make sure Mongodb is installed and running!
H:\hybrid\mernio\myApp\node_modules\mongodb\lib\server.js:265
process.nextTick(function() { throw err; })
^
MongoError: failed to connect to server [localhost:27017] on first connect
at Pool. (H:\hybrid\mernio\myApp\node_modules\mongodb-core\lib\to
pologies\server.js:326:35)
at emitOne (events.js:96:13)
at Pool.emit (events.js:188:7)
at Connection. (H:\hybrid\mernio\myApp\node_modules\mongodb-core
lib\connection\pool.js:270:12)
at Connection.g (events.js:291:16)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:191:7)
at Socket. (H:\hybrid\mernio\myApp\node_modules\mongodb-core\lib
connection\connection.js:175:49)
at Socket.g (events.js:291:16)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1278:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
[nodemon] app crashed - waiting for file changes before starting...
After running npm install -g mern-cli successfully
-bash: mern: command not found
What's up with that, am i missing something here? Looking at instructions i got the feeling it should work by default.
Admin & OS X 10.11.6
code-splitting
is a great feature that can reduce load timings
Lazy loading is a great way to optimize your site, and it does that by splitting your code at logical breakpoints, and then loading it once the user has done something that requires, or will require, a new block of code.
It is done by webpack behind the scenes, separating them into multiple files.
So the idea basically is to have a separate command in which the user can specify which component to be imported in the code-splitting way within the routes file. If the user specifies a component that doesn't exist he/she should be prompted with a suitable message.
When I followed the instructions for MERN-CLI I get the following on OS X 10.11.6
├─┬ UNMET PEER DEPENDENCY [email protected]
Also it would make sense in the instructions to tell people to install Mongo before the GIt commands rather than after.
Running npm install, we get:
UNMET PEER DEPENDENCY [email protected]
UNMET PEER DEPENDENCY webpack@^1.0.0 || ^2.0.0 || ^3.0.0
npm start gives this warning :
`Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs
Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class
(node:16891) DeprecationWarning: open()
is deprecated in mongoose >= 4.11.0, use openUri()
instead, or set the useMongoClient
option if using connect()
or createConnection()
. See http://mongoosejs.com/docs/connections.html#use-mongo-client
`
I'm getting this error:
[email protected]" has incorrect peer dependency "webpack@>=1.12.9 <3.0.0".
Is there an issue with webpack 3.3?
Add a list of all the generators once they are updated on mern-starter
after creating a project with the CLI i did an npm install --production
and then tried a npm run bs
this is what will be done hosting a project in heroku and it failed because of dependencies, is this happening to someone else?
Here's a list of packages that are not maintained according to messages:
Requesting an upgrade via deprecation:
Hello, everyone!
I'm trying to grow out of the example mern-starter, and couldn't create a new route yet. I tried defining a new one (Users) in client/routes.js
but it doesn't work, Express returns "Cannot GET /users".
Hi all,
Thanks for your great work but I don't found anything related to auto generate the new modules, etc. does it support it as well
Thanks
(Mac OS X 10.13.6) prefix with sudo, install hangs with
Unhandled rejection Error: Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /Users/jon/.npm/_cacache/tmp/git-clone-bc41fa44
/Users/jon/.npm/_cacache/tmp/git-clone-bc41fa44/.git: Permission denied
at ChildProcess.exithandler (child_process.js:291:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Socket.stream.socket.on (internal/child_process.js:380:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close [as _onclose] (net.js:595:12)
Can't understand the "Permission denied" as path to .../tmp exists and is owned by me ?
sfuentes@sfuentes-desktop:~/Projects/myApp$ uname -a
Linux sfuentes-desktop 3.13.0-85-generic #129-Ubuntu SMP Thu Mar 17 20:50:15 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
sfuentes@sfuentes-desktop:~/Projects$ node --version
v4.4.4
sfuentes@sfuentes-desktop:~/Projects$ npm version
{ npm: '2.15.1',
ares: '1.10.1-DEV',
http_parser: '2.5.2',
modules: '46',
node: '4.4.4',
openssl: '1.0.2h',
uv: '1.8.0',
v8: '4.5.103.35',
zlib: '1.2.8' }
sfuentes@sfuentes-desktop:~/Projects$ sudo npm install -g mern-cli
[sudo] password for sfuentes:
/usr/local/bin/mern -> /usr/local/lib/node_modules/mern-cli/bin/mern.js
/usr/local/bin/merng -> /usr/local/lib/node_modules/mern-cli/bin/merng.js
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/npm-package-arg requires semver@'4' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/semver,
npm WARN unmet dependency which is version 5.1.0
[email protected] /usr/local/lib/node_modules/mern-cli
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected])
sfuentes@sfuentes-desktop:~/Projects$ mern init myApp
Initialized empty Git repository in /home/sfuentes/Projects/myApp/.git/
Fetching the boilerplate...⠋
From https://github.com/Hashnode/mern-starter
Completed.....You are good to go!
sfuentes@sfuentes-desktop:~/Projects$ cd myApp/
sfuentes@sfuentes-desktop:~/Projects/myApp$ npm install
npm WARN peerDependencies The peer dependency webpack@>=1.12.9 <3.0.0 included from babel-plugin-webpack-loaders will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency webpack@^1.4.0-beta6 included from chunk-manifest-webpack-plugin will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency webpack@^1.9.11 included from extract-text-webpack-plugin will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead!
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> [email protected] postinstall /home/sfuentes/Projects/myApp/node_modules/pre-commit/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall
> [email protected] install /home/sfuentes/Projects/myApp/node_modules/pre-commit
> node install.js
> [email protected] postinstall /home/sfuentes/Projects/myApp/node_modules/mockgoose/node_modules/mongodb-prebuilt/node_modules/spawn-sync
> node postinstall
|
> [email protected] postinstall /home/sfuentes/Projects/myApp/node_modules/mockgoose/node_modules/mongodb-prebuilt
> node install.js
done
inside extract, run complete
Done installing MongoDB
npm WARN optional dep failed, continuing [email protected]
\
> [email protected] postinstall /home/sfuentes/Projects/myApp/node_modules/postcss-cssnext/node_modules/caniuse-api
> node generator.js
caniuse-api: Generation ok
-
> [email protected] install /home/sfuentes/Projects/myApp/node_modules/limax/node_modules/pinyin/node_modules/nodejieba
> node-gyp rebuild
make: Entering directory `/home/sfuentes/Projects/myApp/node_modules/limax/node_modules/pinyin/node_modules/nodejieba/build'
CXX(target) Release/obj.target/nodejieba/lib/index.o
CXX(target) Release/obj.target/nodejieba/lib/nodejieba.o
SOLINK_MODULE(target) Release/obj.target/nodejieba.node
COPY Release/nodejieba.node
make: Leaving directory `/home/sfuentes/Projects/myApp/node_modules/limax/node_modules/pinyin/node_modules/nodejieba/build'
npm ERR! Linux 3.13.0-85-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants webpack@1 || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@^1.9.11
npm ERR! peerinvalid Peer [email protected] wants webpack@1 || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@^1.4.0-beta6
npm ERR! peerinvalid Peer [email protected] wants webpack@>=1.12.9 <3.0.0
npm ERR! peerinvalid Peer [email protected] wants webpack@^2.1.0-beta
npm ERR! Please include the following file with any support request:
npm ERR! /home/sfuentes/Projects/myApp/npm-debug.log
npm start throws this error:
`internal/modules/cjs/loader.js:596
throw err;
^
Error: Cannot find module '/home/marinangelo/web/lernen/react/MERN'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-core/lib/transformation/file/index.js:558
throw err;
^
Error: /home/marinangelo/web/lernen/react/MERN cli/myApp/client/modules/App/App.js: Command failed: node /home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/webpack/bin/webpack.js /home/marinangelo/web/lernen/react/MERN cli/myApp/client/modules/App/App.css /tmp/.webpack.res.1552915452152_234802.js --config ./webpack.config.babel.js --bail
internal/modules/cjs/loader.js:596
throw err;
^
Error: Cannot find module '/home/marinangelo/web/lernen/react/MERN'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)
at checkExecSyncError (child_process.js:603:11)
at execSync (child_process.js:640:13)
at exports.default (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-plugin-webpack-loaders/lib/runWebPackSync.js:39:51)
at PluginPass.CallExpression (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-plugin-webpack-loaders/lib/plugin.js:103:60)
at newFn (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/context.js:108:19)
at TraversalContext.visit (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/context.js:192:19)
at Function.traverse.node (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/index.js:114:17)
at NodePath.visit (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/path/context.js:115:19)
at TraversalContext.visitQueue (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/home/marinangelo/web/lernen/react/MERN cli/myApp/node_modules/babel-traverse/lib/context.js:190:19)
[nodemon] app crashed - waiting for file changes before starting...`
any idea?
When I do sudo npm i -g mern-cli
, it throws an error while installing next-tick
dependency:
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'i', '-g', 'mern-cli' ]
2 info using [email protected]
3 info using [email protected]
...
153 silly pacote version manifest for [email protected] fetched in 391ms
154 silly resolveWithNewModule [email protected] checking installable status
155 silly fetchPackageMetaData error for next-tick@github:timoxley/next-tick#0.0.2 Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /root/.npm/_cacache/tmp/git-clone-bfd0df2f
155 silly fetchPackageMetaData fatal: не удалось создать родительские каталоги для «/root/.npm/_cacache/tmp/git-clone-bfd0df2f»: Отказано в доступе
156 timing stage:rollbackFailedOptional Completed in 1ms
157 timing stage:runTopLevelLifecycles Completed in 13448ms
158 verbose stack Error: Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /root/.npm/_cacache/tmp/git-clone-bfd0df2f
158 verbose stack fatal: не удалось создать родительские каталоги для «/root/.npm/_cacache/tmp/git-clone-bfd0df2f»: Отказано в доступе
158 verbose stack
158 verbose stack at ChildProcess.exithandler (child_process.js:289:12)
158 verbose stack at ChildProcess.emit (events.js:182:13)
158 verbose stack at maybeClose (internal/child_process.js:961:16)
158 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
159 verbose cwd /home/sh1ft
160 verbose Linux 4.16.18-1-MANJARO
161 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "-g" "mern-cli"
162 verbose node v10.9.0
163 verbose npm v6.4.0
164 error code 128
165 error Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /root/.npm/_cacache/tmp/git-clone-bfd0df2f
165 error fatal: не удалось создать родительские каталоги для «/root/.npm/_cacache/tmp/git-clone-bfd0df2f»: Отказано в доступе
166 verbose exit [ 1, true ]
Of course, installation from superuser shell works like a charm. But I don't think that NPM module installation should work in su only.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.