Comments (7)
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.
Easiest fix here will be to switch to the default es2015
preset.
from preact-boilerplate.
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.
@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.
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.
@developit sorry I didn't get that "Easiest fix here will be to switch to the default es2015 preset."
from preact-boilerplate.
Fixed by switching to es2015.
from preact-boilerplate.
Related Issues (20)
- Help with config? HOT 4
- An in-range update of script-ext-html-webpack-plugin is breaking the build 🚨 HOT 1
- An in-range update of eslint-plugin-react is breaking the build 🚨 HOT 2
- An in-range update of copy-webpack-plugin is breaking the build 🚨 HOT 2
- An in-range update of promise-polyfill is breaking the build 🚨 HOT 1
- await needed in router tests (app.test.js)? HOT 4
- An in-range update of css-loader is breaking the build 🚨 HOT 3
- An in-range update of serve is breaking the build 🚨 HOT 6
- An in-range update of postcss-loader is breaking the build 🚨 HOT 1
- Example of SW integration HOT 3
- Static HTML files? question HOT 1
- An in-range update of preact is breaking the build 🚨 HOT 2
- An in-range update of preact-router is breaking the build 🚨 HOT 1
- An in-range update of serve is breaking the build 🚨 HOT 1
- dependency bugs HOT 3
- requestAnimationFrame for HMR ? HOT 2
- unexpected token { HOT 1
- nrp run dev does not show latest changes HOT 1
- BrowserslistError: Unknown browser query `dead`
- Error when I try to install
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from preact-boilerplate.