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

Can't build under nodejs 16 #339

Closed
alerque opened this issue May 5, 2021 · 12 comments
Closed

Can't build under nodejs 16 #339

alerque opened this issue May 5, 2021 · 12 comments
Labels
documentation Improvements or additions to documentation

Comments

@alerque
Copy link
Contributor

alerque commented May 5, 2021

Given my issues with the prebuilt binary (#338) I decided to try setting up the resources for a --static-dir. That requires building the frontend, so down the rabbit hole I went.

I tried first with my system's node, which is 16.1.0. That blew up in my face, node_gyp couldn't compile something or other. I switched to building in a clean chroot with 14.16.0 instead and that went fine.

It looks like something in the node-sass dependency is holding this back from compiling on current versions.

@mr-karan
Copy link
Collaborator

mr-karan commented May 5, 2021

It looks like something in the node-sass dependency is holding this back from compiling on current versions.

sass/node-sass#3077

@knadh knadh added the documentation Improvements or additions to documentation label May 6, 2021
@knadh
Copy link
Owner

knadh commented May 21, 2021

Looks like node-sass now supports Node 16: sass/node-sass#3090

@knadh knadh closed this as completed May 21, 2021
@alerque
Copy link
Contributor Author

alerque commented May 22, 2021

Hmm, thanks for the news and you seem to be correct...

However this isn't quite fixed for Listmonk because the package currently calls for a v4.x dependency and the fixes you link to are only in v6.0.0 upstream. Listmonk will not build properly until this is updated:

{
  "dependencies": {
    "node-sass": "^4.14.1"
  }
}

I tried bumping just this dependency, but it's not quite that simple. The sass-loader dependency is also several major versions behind, and bumping that causes build errors.

@knadh
Copy link
Owner

knadh commented May 23, 2021

Ouch. I just spent a couple hours investigating this which turned out to be a rabbit hole. Tracking this here: #369

@knadh
Copy link
Owner

knadh commented May 23, 2021

Merged: https://github.com/knadh/listmonk/pull/371/files

@alerque could you check if it compiles on Node 16 now? I don't have 16.

@knadh knadh reopened this May 23, 2021
@mr-karan
Copy link
Collaborator

I'm running v16.2.0. It builds fine :)

$ make deps
$ make build-frontend

...
 DONE  Build complete. The dist directory is ready to be deployed.
 INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
   
Done in 36.33s.

@alerque
Copy link
Contributor Author

alerque commented May 24, 2021

I can confirm too, I just successfully built from Git HEAD in a clean chroot system with Node 16.2.0 an Arch Linux.

@alerque alerque closed this as completed May 24, 2021
@stiofand
Copy link

stiofand commented Jun 1, 2021

On mac Catalina with Node 16, there are still issues with node-sass via npm install. Is there any progress on this as a stable update?

@alerque
Copy link
Contributor Author

alerque commented Jun 1, 2021

@thebarefootdev You realize that these fixes are not in any released version yet, they only work for building the Git HEAD from the master branch, right?

@stiofand
Copy link

stiofand commented Jun 1, 2021

@alerque Is that a question or sarcasm?

Assuming it's a question, then no, I didn't realize, I'm not involved on npm modules to that level. Apologies for not being in the know 😉

@alerque
Copy link
Contributor Author

alerque commented Jun 1, 2021

Just a question, not sarcasm. The issue here is closed because the change has been made in the master branch. You can checkout and build from a clone, but not from the last released version yet which was released before this fix.

@knadh
Copy link
Owner

knadh commented Jun 1, 2021

On mac Catalina with Node 16, there are still issues with node-sass via npm install.

Are you pulling master and then trying to install? Like @alerque said, this has been fixed and merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants