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

Windows Install error-options is not defined #54

Closed
alterhu2020 opened this issue Mar 10, 2019 · 9 comments
Closed

Windows Install error-options is not defined #54

alterhu2020 opened this issue Mar 10, 2019 · 9 comments

Comments

@alterhu2020
Copy link
Contributor

alterhu2020 commented Mar 10, 2019

When install the nuxt7 from fresh Window 10 with Nodejs v11.10.1 it shows below installation error:

image

cannot init the nuxt7 project.

@alterhu2020
Copy link
Contributor Author

Also windows run the command npm run dev will trail the path incorrect: see below error:
image

you can see that the windows path had not parsed correct for the \node_modules.... or other

@alterhu2020
Copy link
Contributor Author

@pi0 , this issue is critical in the code in options.js:

  // Icons
  if (options.f7Icons) {
    options.f7IconsSrc = resolvePath('fonts/framework7-icons.css')
  }

  if (options.mdIcons) {
    options.mdIconsSrc = resolvePath('fonts/material-icons.css')
  }


@alterhu2020
Copy link
Contributor Author

alterhu2020 commented Mar 12, 2019

Why the Mac machine throws the same exception as below:

image

@pi0 , Team, Could you help solving this critical issue, I try to integrate the framework7 with existing nuxt project, appreciated that if you can take time to have a look.

@pi0
Copy link
Member

pi0 commented Mar 12, 2019

@alterhu2020 It seems you are using NPX which is not fully supported by nuxt. Would you please try using a normal yarn install?

@alterhu2020
Copy link
Contributor Author

alterhu2020 commented Mar 13, 2019

Hi,
@pi0 , It's not related to the yarn package issue, I had also tried using below yarn command in windows platform, it also throws the exceptions:

cd template
yarn
yarn run dev

image

@alterhu2020
Copy link
Contributor Author

also npx sao nuxt-community/nuxt7 nuxt7-app command is from your official README document, why it not works? thanks very much for your reply @pi0

@alterhu2020
Copy link
Contributor Author

alterhu2020 commented Mar 15, 2019

Hi @pi0
Could you change the code in options.js for the import package using hard code path instead of resolve method to get the icon path ,like below changes:

lib\options.js


 // Icons
  if (options.f7Icons) {
    options.f7IconsSrc = 'nuxt7/lib/fonts/framework7-icons.css'
  }

  if (options.mdIcons) {
    options.mdIconsSrc = 'nuxt7/lib/fonts/material-icons.css'
  }

or can add one line code to resolve method so it can recognize the windows path correct 👍

 newPath.replace(/\\/g, path.sep + path.sep)

in this way it can support for windows platform as well, thanks .

@alterhu2020
Copy link
Contributor Author

Close it as pull request #58

@pi0
Copy link
Member

pi0 commented Mar 20, 2019

released in v3.1.0

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