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

yarn run dev is not working #1330

Closed
MHamzaRajput opened this issue Jul 26, 2020 · 8 comments
Closed

yarn run dev is not working #1330

MHamzaRajput opened this issue Jul 26, 2020 · 8 comments

Comments

@MHamzaRajput
Copy link

D:\ftw-daily>yarn run dev
yarn run v1.22.4
$ yarn run config-check&&export NODE_ENV=development REACT_APP_DEV_API_SERVER_PORT=3500&&concurrently --kill-others "yarn run dev-frontend" "yarn run dev-backend"
$ node scripts/config.js --check
'export' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

D:\ftw-daily>yarn run dev

@priusGit
Copy link

priusGit commented Aug 5, 2020

If you are a Windows user
In your ftw-daily folder find file package.json line 95: "dev" and line 104 "dev-sever" change "export" to "set".
Your line 95 should look like:
"dev": "yarn run config-check&&set NODE_ENV=development REACT_APP_DEV_API_SERVER_PORT=3500&&concurrently --kill-others \"yarn run dev-frontend\" \"yarn run dev-backend\"",
and line 104 should look like:
"dev-server": "set NODE_ENV=development PORT=4000 REACT_APP_CANONICAL_ROOT_URL=http://localhost:4000&&yarn run build&&nodemon --watch server server/index.js",

Worked perfectly to me, cheers.
thechutrain/mern-passport#3

@Gnito
Copy link
Contributor

Gnito commented Aug 6, 2020

Yeah, FTW templates are mainly made for Unix-like operating systems, since most host services are on top of Linux or something similar.

"export" works in those environments to set environment variables, whereas DOS would need "set".

So, you should be able to get node app working by making the suggested change. However, I strongly recommend that you install Windows Subsystem for Linux.

For example, our documentation also assumes Unix-like commands instead of DOS commands.

Anyway, I'll add a ticket to our system that we should add a note about this issue to our repos.

@Gnito
Copy link
Contributor

Gnito commented Aug 11, 2020

We decided to settle with adding an extra note to README.md.
Closing this for now.

@Gnito Gnito closed this as completed Aug 11, 2020
@casaltenburg
Copy link

image

Followed all the steps but the "yarn run dev" command failed. Maybe i need an other version of the "jose" package?
I'm working on Windows 10, is Linux really necessary?

@Buymina
Copy link

Buymina commented Nov 12, 2021

I am a windows user, I have the same issue on "PRODUCT", not "DAILY"

image

As suggested above, I changed the 'export' to 'set' in the package.json (different line numbers) but nothing happened.

image

@aquilinoFrancisco
Copy link

If you are a Windows user In your ftw-daily folder find file package.json line 95: "dev" and line 104 "dev-sever" change "export" to "set". Your line 95 should look like: "dev": "yarn run config-check&&set NODE_ENV=development REACT_APP_DEV_API_SERVER_PORT=3500&&concurrently --kill-others \"yarn run dev-frontend\" \"yarn run dev-backend\"", and line 104 should look like: "dev-server": "set NODE_ENV=development PORT=4000 REACT_APP_CANONICAL_ROOT_URL=http://localhost:4000&&yarn run build&&nodemon --watch server server/index.js",

Worked perfectly to me, cheers. thechutrain/mern-passport#3

it worked for me

@bloddycrocodile
Copy link

I have a issue
please help
img (4)

@omadityaxd
Copy link

make sure that package.json is in your root directory , dont make a separate folder , if already made only ,open the folder which has package.json as a file , in your vs code and then try again!!
if not check your latest yarn version in cmd yarn --v

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

8 participants