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(vue): support project creation with Node 16 and pnpm #394

Merged
merged 2 commits into from
Jul 30, 2021
Merged

Conversation

y-lakhdar
Copy link
Contributor

https://coveord.atlassian.net/browse/CDX-520

Proposed changes

Creating a VueJs project with Node 16 and pnpm causes the following error
image

CDX-520

@@ -143,7 +143,7 @@ export default class Vue extends Command {
// user: providerUsername,
// },
},
cssPreprocessor: 'node-sass',
cssPreprocessor: 'sass',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Node Sass causes some errors on the pnpm installation.
Node Sass is deprecated anyway.

@@ -12,11 +12,15 @@ module.exports = (api, options, rootOptions) => {
'@coveo/headless': '*',
'@coveo/search-token-server': '*',
buefy: '^0.9.4',
bulma: '^0.9.3',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even if Buefy depends on Bulma, it has to be specified in the dependencies. Otherwise, the module is not found (when installed with pnpm).

concurrently: '^5.3.0',
dotenv: '^9.0.2',
'get-port': '^5.1.1',
'fs-extra': '^10.0.0',
},
devDependencies: {
tslib: '^2.3.0',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same thing as above.
tslib should be added by @vue/cli, when using a typescript preset.

@@ -27,6 +27,7 @@ function copySearchTokenServerToRoot() {
resolve('server'),
{
filter: (src, dest) => !isNodeModule(dest) && !isEnvFile(dest),
dereference: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because pnpm does some kind of symlink magic

@y-lakhdar y-lakhdar merged commit aec9ba0 into master Jul 30, 2021
@y-lakhdar y-lakhdar deleted the CDX-520 branch July 30, 2021 19:10
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