Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not run as production in window box s hosted in AWS #532

Open
AmiteswarRoy opened this issue Jun 30, 2017 · 1 comment
Open

Could not run as production in window box s hosted in AWS #532

AmiteswarRoy opened this issue Jun 30, 2017 · 1 comment

Comments

@AmiteswarRoy
Copy link

AmiteswarRoy commented Jun 30, 2017

I am trying to run the application in windows in production mode, but I am getting below error.

C:\Users\roya\git\isomorphic-flux-boilerplate>npm run build

> isomorphic-flux-boilerplate@15.0.0 build C:\Users\roya\git\isomorphic-flux-boi
lerplate
> SET BABEL_ENV=production && babel-node .
ode_modules/.bin/webpack --config ./internals/webpack/prod.config.js

C:\Users\roya\git\isomorphic-flux-boilerplate\node_modules\koa-mount\index.js:48

  return async function (ctx, upstream){
               ^^^^^^^^
SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Module._extensions..js (module.js:579:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\roya\gi
t\isomorphic-flux-boilerplate\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! isomorphic-flux-boilerplate@15.0.0 build: `SET BABEL_ENV=production &&
babel-node .
npm ERR! ode_modules/.bin/webpack --config ./internals/webpack/prod.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the isomorphic-flux-boilerplate@15.0.0 build script 'SET BABE
L_ENV=production && babel-node .
npm ERR! ode_modules/.bin/webpack --config ./internals/webpack/prod.config.js'.
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 isomorphic-flux-boile
rplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     SET BABEL_ENV=production && babel-node .
npm ERR! ode_modules/.bin/webpack --config ./internals/webpack/prod.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs isomorphic-flux-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls isomorphic-flux-boilerplate
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\roya\git\isomorphic-flux-boilerplate\npm-debug.log

I have made some changes in package.json as the npm start command was having issues in windows,

"build": "SET BABEL_ENV=production && babel-node .\node_modules/.bin/webpack --config ./internals/webpack/prod.config.js"
"start": "SET NODE_ENV=production && npm run build && SET NODE_ENV=production && node server/index.js"

@EugeneHlushko
Copy link
Collaborator

Hi @AmiteswarRoy, might sound weird but did you try node 7.6+?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants