ignite / web

Monorepo for packages used by Ignite CLI, including a template, component library and a set of Vuex modules

Home Page:https://ignite.com/cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Starport Vue App fails to build

whatzaruckus opened this issue · comments

Describe the bug
When doing npm run dev or npm run serve inside the vue folder, the build fails with no clear route to resolve.

To Reproduce
Steps to reproduce the behavior:

  1. scaffold a new chain using OSX.
  2. Run chain server starport chain serve
  3. go to vue folder and run npm install
  4. run npm run serve or npm run dev
  5. Observe failed build:

INFO Starting development server...
98% after emitting CopyPlugin

ERROR Failed to compile with 1 error

error in ./node_modules/@starport/vue/lib/starport-vue.common.js

Module parse failed: Unexpected token (18894:247)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

This has been demonstrated with latest starport version.

Please provide the version output

  • starport version:
    Starport version: v0.18.6
    Starport build date: 2021-11-30T10:47:45Z
    Starport source hash: -
    Your OS: darwin
    Your arch: amd64
    Your go version: go version go1.17.1 darwin/amd64

Can you share your node version by running node --version?

I got the same issue with node: v14.18.2. MacOS 11.6.1 M1

@batphonghan please try using v16.x.x

I was also using node 14. Will try with 16.

node --version
v16.8.0

npm run serve
Starting development server...

ERROR Failed to compile with 1 error 10:15:50 AM

error in ./src/scss/app.scss

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (93)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1

Apparently node-sass doesn't support OSX, windows, or many flavors of linux with node.js 16. I'd like to humbly request not running bleeding-edge for everything, as it does tend to cause lots of these compatibility issues. No OSX/windows support shuts down 90% of dev boxes. This is particularly frustrating for Vue when we're trying to do UI work in browsers and the target customers will almost always be using OSX/Windows, etc.

Or at least consistently bleeding edge. Node sass v4.14.1 is only supported up to ~14. Need to move to Node-sass 6 in order to get support for the latest node.js

Can we get this working with Node 14 please? Moving to node 16 fixes one issue and unleashes a lot of other incompatibilities. Is there really any need for 16?

I was able to finally get things running by changing to tendermint/vue v0.1.50 exactly.

I haven't investated what changed since that version but that caused the break. But all my above comments still stand, there's a mess of compatibility issues here long term.

Starport v0.18.4 and newer pulls in vue template >= 0.1.54 which no longer uses node-sass so it's really surprising to see node-sass issues as it shouldn't be there at all.

Were you by any chance working on a chain repo that was originally scaffolded with an older version of starport?

@whatzaruckus we totally agree that our dependencies stack could be simpler. We've simplified a little bit on v0.1.54 and for our next major we're taking this improvement as a priority.


Can we get this working with Node 14?

Right now we support node v16 and plan to support v17 and beyond with our next major. Anything earlier than that is not recommended.

@batphonghan as I'm also running on a M1, I suggest you to stay somewhere within node v16. Not only due to our repo but also overall npm/node stuff.