Unable to start the server.
mayankessar opened this issue · 15 comments
Need help to run this project.
- There is no dev task in gulpfile.js.
- gulp dist is throwing error.
[13:51:41] Requiring external module babel-register
C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180
throw new ReferenceError(messages.get("pluginUnknown", plugin, loc, i, dirname));
^
ReferenceError: Unknown plugin "react-hot-loader/babel" specified in "C:\Users\singmaya\Documents\GitHub\grommet-ferret\.babelrc" at 1, attempted to resolve relative to "C:\Users\singmaya\Documents\GitHub\grommet-ferret"
at C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180:17
at Array.map (native)
at Function.normalisePlugins (C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\node_modules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
at OptionManager.mergeOptions (C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\node_modules\babel-core\lib\transformation\file\options\option-manager.js:233:36)
at OptionManager.init (C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\node_modules\babel-core\lib\transformation\file\options\option-manager.js:367:12)
at compile (C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\lib\node.js:103:45)
at loader (C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\lib\node.js:144:14)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\singmaya\Documents\GitHub\grommet-ferret\node_modules\babel-register\lib\node.js:154:7)
at Module.load (module.js:487:32)
I have the same issue, the error is
Task 'dev' is not in your gulpfile.
can you try npm install react-hot-loader --save-dev
?
If this works, can you send a pull request to add it to out package.json?
gulp dev
is coming from the toolbox.
It did not work, still the same issue
can you confirm the version of node and npm?
The node version is 7.5.0 and npm version is 4.1.2
npm start server/server.js will run dev server
same for me:
[15:17:00] Using gulpfile ~/desa/tmp/work/grommet-ferret/server/gulpfile.js
[15:17:00] Task 'dev' is not in your gulpfile
[15:17:00] Please check the documentation for proper gulpfile formatting
I tried both solutions npm install react-hot-loader --save-dev
and npm start server/server.js
.
I'm currently updating ferret to the latest grommet and the latest grommet-cli. I will push the changes very soon.
@alansouzati hey, did you solve it? Because I'm having the same problem witch 'react-hot-loader/patch'
@burakuluu cc @alansouzati I think the README is just incorrect (or outdated)? I had these errors but then I looked at the code and was up and running with these commands -- two terminals, run both from the root of the repo (no cd-ing into server/
)
first terminal
npm i
npm run start:dev
second terminal
gulp dev
EDIT: If this solves the problem for someone else, I'll take out a PR to update the README, so let me know!
also, the prod server part can be fixed with
npm run build
npm run start
Can't just run node server/server.js
directly because its needs babel to transpile
Hi,
running npm run start:dev
results in a crash
[nodemon] app crashed - waiting for file changes before starting...
running npm run build
and start
results in errors for me
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! grommet-ferret@0.3.0 build:gulp dist
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grommet-ferret@0.3.0 build script 'gulp dist'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grommet-ferret package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp dist
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs grommet-ferret
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls grommet-ferret
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/daniellozynski/grommet-ferret/npm-debug.log
@carolineartz I can confirm that running the 2 commands you provided fixes the issue. The Server starts and also the app. You can go ahead and create a PR with the changes to the README.
@radumiron sounds good, will do.
Updated the README instructions to make them more accurate and complete, and verified that they work.
Added the cross-env package as a dev dependency and added it to the start:dev script.