Code Monkey home page Code Monkey logo

Comments (11)

nikhilbelchada avatar nikhilbelchada commented on May 23, 2024 1

@developit I am not using less or sass, just trying to run the default app.

Steps I followed:

preact create my-great-app
cd my-great-app/
npm start [works fine]
npm run build [error..]

from preact-cli.

nikhilbelchada avatar nikhilbelchada commented on May 23, 2024 1

@developit yes i was on v4, now i updated to v6 and its working, so issue is specific to v4.

from preact-cli.

developit avatar developit commented on May 23, 2024

@nikhilbelchada You can circumvent this using preact build --no-prerender, but I'd like to figure out why that's happening. Are you using less or sass?

from preact-cli.

juanpasolano avatar juanpasolano commented on May 23, 2024

I'm having the same issue. No less or sass but my error is

bundle.js from UglifyJs
Unexpected token: punc ()) [bundle.js:5084,22]

preact build --no-prerender does not work either

$ node -v
v4.1.0
$ npm -v
4.4.1

from preact-cli.

tiansijie avatar tiansijie commented on May 23, 2024

seems like using the same node version of your preact-cli installed will solve the problem

from preact-cli.

developit avatar developit commented on May 23, 2024

@nikhilbelchada are you also running Node v4? I think most of our testing has been done on 6+. I'll try to test out on 4 as soon as I can.

from preact-cli.

lukeed avatar lukeed commented on May 23, 2024

We can run a pre/post-install hook & notify on version mismatch. Recent push in node CLI community to bite the bullet and enforce 6+ anyway since 4.x is no longer active LTS.

from preact-cli.

developit avatar developit commented on May 23, 2024

ahh brilliant - at least knowing it's a 4.x issue we can debug.

I'm actually thinking this is happening because Babel was never being run on those files - in Node 6 that didn't matter because it supports a decent amount of ES2015. In node 4 it bails though. It's like this gotcha:
https://github.com/babel/babel/tree/master/packages/babel-register#ignores-node_modules-by-default

from preact-cli.

ds82 avatar ds82 commented on May 23, 2024

@lukeed As long as a node LTS version is in maintenance it should be supported by libs & tools. That's the spirit of LTS anyway ..

from preact-cli.

developit avatar developit commented on May 23, 2024

This will be fixed by switching SSR to use a webpack bundle.

from preact-cli.

SaraVieira avatar SaraVieira commented on May 23, 2024

@rkostrzewski This can be closed too right ?

from preact-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.