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

fix: build on Windows #377

Merged
merged 3 commits into from
Mar 2, 2021
Merged

fix: build on Windows #377

merged 3 commits into from
Mar 2, 2021

Conversation

filipsobol
Copy link
Contributor

@filipsobol filipsobol commented Feb 17, 2021

When @nuxtjs/composition-api is a dependency of a project, the installation always fails on Windows, because of UNIX commands.

[4/4] Building fresh packages...
$ yarn build
yarn run v1.22.10
$ yarn clean && yarn compile
$ rm -rf lib/*
'rm' is not recognized as an internal or external command,
operable program or batch file.

This PR replaces rm -rf with OS-agnostic library rimraf.

@vercel
Copy link

vercel bot commented Feb 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nuxt-community/composition-api/2qk6r1hpE3apdt26WRb2aToLwc5x
✅ Preview: https://composition-ap-git-fork-filipsobol-fix-build-on-windows-efc075.vercel.app

@filipsobol filipsobol changed the title Fix build on Windows fix: build on Windows Feb 17, 2021
package.json Outdated
@@ -67,6 +67,7 @@
"dependencies": {
"@vue/composition-api": "1.0.0-rc.1",
"defu": "^3.2.2",
"rimraf": "^3.0.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move this to devDependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be production dependency if I'm not mistaken. It will not only be used during development but also when used as a dependency, because yarn build is ran during installation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why yarn build is being run in your case. Perhaps it's wrongly triggered by the preparescript - or maybe you have the package installed via GitHub rather than non. But regardless the build will fail without the other devdependencies.

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for this ❤️

(Also note rimfar for amusement.)

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

Successfully merging this pull request may close these issues.

2 participants