Code Monkey home page Code Monkey logo

Comments (7)

dehli avatar dehli commented on May 24, 2024 2

I'm getting the same issue on Mac using npm 3. It runs fine, but I'm getting the errors when I do:
npm run dev

from preact-boilerplate.

developit avatar developit commented on May 24, 2024 1

Easiest fix here will be to switch to the default es2015 preset.

from preact-boilerplate.

developit avatar developit commented on May 24, 2024

it seems like you're using npm 2 - I would suggest trying with npm 3:

npm i -g npm@3
rm -rf node_modules
npm i

from preact-boilerplate.

kuldeepkeshwar avatar kuldeepkeshwar commented on May 24, 2024

@developit no i'm not using npm@2

KuldeepMac:~ kuldeepkeshwar$ node -v
v6.9.1
KuldeepMac:~ kuldeepkeshwar$ npm -v 
3.10.8
KuldeepMac:~ kuldeepkeshwar$ 

from preact-boilerplate.

milosh012 avatar milosh012 commented on May 24, 2024

Hi @developit,

Im also using Mac
npm v4.0.3
node v6.2.1

and Im getting similar error "SyntaxError: Unexpected token import" when running npm run dev

> cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress

/Users/XXX/projects/XXX/webpack.config.babel.js:1
(function (exports, require, module, __filename, __dirname) { import webpack from 'webpack';
                                                              ^^^^^^
SyntaxError: Unexpected token import
    at Object.exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:513:28)
    at loader (/Users/XXX/projects/XXX/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/XXX/projects/XXX/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at module.exports (/Users/XXX/projects/XXX/node_modules/webpack/bin/convert-argv.js:80:13)

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v6.2.1
npm ERR! npm  v4.0.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: `cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] dev script 'cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the preact-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development webpack-dev-server --inline --hot --progress
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs preact-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls preact-boilerplate
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

from preact-boilerplate.

kuldeepkeshwar avatar kuldeepkeshwar commented on May 24, 2024

@developit sorry I didn't get that "Easiest fix here will be to switch to the default es2015 preset."

from preact-boilerplate.

developit avatar developit commented on May 24, 2024

Fixed by switching to es2015.

from preact-boilerplate.

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.