google / web-starter-kit

Web Starter Kit - a workflow for multi-device websites
http://developers.google.com/web/starter-kit
Apache License 2.0
18.42k stars 3.01k forks source link

npm test error: Cannot find module 'babel-plugin-transform-es2015-function-name' #783

Closed HansS closed 8 years ago

HansS commented 8 years ago

Hans@HP-HANS C:\Users\Hans\Web\starterkits\web-starter-kit

npm test

@ test C:\Users\Hans\Web\starterkits\web-starter-kit
gulp && git status | grep 'working directory clean' >/dev/null || (echo 'Please commit all changes generated by building'; exit 1)

[18:51:02] Requiring external module babel-core/register
module.js:338
throw err;
^
Error: Cannot find module 'babel-plugin-transform-es2015-function-name'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\Users\Hans\Web\starterkits\web-starter-kit\node_modules\babel-preset-es2015\index.js:5:5)
at Module._compile (module.js:460:26)
at Module._extensions..js (module.js:478:10)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
'Please commit all changes generated by building'; exit 1

Hans@HP-HANS C:\Users\Hans\Web\starterkits\web-starter-kit

addyosmani commented 8 years ago

https://www.npmjs.com/package/babel-preset-es2015 which we pull in as a dependency should be getting the one you're missing pulled in as well (the Cannot find module 'babel-plugin-transform-es2015-function-name' error you're seeing).

Can you try running npm cache clean followed by reinstalling your modules with npm install?

addyosmani commented 8 years ago

Just grabbed a fresh version from master and was unable to reproduce this bug. Could you let us know if the above helps at all?

HansS commented 8 years ago

The error ocurrs only when running gulp after installation Running Gulp serve runs without errors!.

HansS commented 8 years ago

I am sorry: I get the error again: Hans@HP-HANS C:\Users\Hans\Web\starterkits\web-starter-kit

gulp serve
[13:46:35] Requiring external module babel-core/register
module.js:338
throw err;
^
Error: Cannot find module 'babel-plugin-transform-es2015-function-name'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\Users\Hans\Web\starterkits\web-starter-kit\node_modules\babel-preset-es2015\index.js:5:5)
at Module._compile (module.js:460:26)
at Module._extensions..js (module.js:478:10)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)

addyosmani commented 8 years ago

Running gulp and gulp serve to test. Unable to reproduce this on Mac, but testing on my Windows 10 box now in case there are cross-platform issues there.

addyosmani commented 8 years ago

gulp serve working:

2015-11-24

gulp working:

capture

Could you share what version of Node.js and Gulp you're running?

HansS commented 8 years ago

Hans@HP-HANS C:\Users\Hans\Web\starterkits\web-starter-kit > nvm list 5.1.0 * 0.12.7 (Currently using 64-bit executable) Hans@HP-HANS C:\Users\Hans\Web\starterkits\web-starter-kit > gulp --version [15:22:21] Requiring external module babel-core/register [15:22:21] CLI version 3.9.0 [15:22:21] Local version 3.9.0

Date: Tue, 24 Nov 2015 06:05:24 -0800 From: notifications@github.com To: web-starter-kit@noreply.github.com CC: hans.schenker@windowslive.com Subject: Re: [web-starter-kit] npm test error: Cannot find module 'babel-plugin-transform-es2015-function-name' (#783)

gulp serve working:

gulp working:

Could you share what version of Node.js and Gulp you're running?

— Reply to this email directly or view it on GitHub.

addyosmani commented 8 years ago

I'm testing using Node 4 (latest).Would it be possible for you to update and try again? (sorry for the back and forth on dependencies).

HansS commented 8 years ago

Hi Addy, i downloaded the zip file:web-starter-kit-0.5.4.zipextraceted zipnpm i with node 0.12.7 and npm 2.11.3 and gulp 3.9.0error with node-sass: corrected with "npm rebuild node-sass"run gulp with no errorshttp-server dist directory (home page started well but one error in http-server console:"[Tue, 24 Nov 2015 16:44:41 GMT] "GET /service-worker.js" Error (404): "Not found"" kind regardsHans

Date: Tue, 24 Nov 2015 07:55:30 -0800 From: notifications@github.com To: web-starter-kit@noreply.github.com CC: hans.schenker@windowslive.com Subject: Re: [web-starter-kit] npm test error: Cannot find module 'babel-plugin-transform-es2015-function-name' (#783)

I'm testing using Node 4 (latest).Would it be possible for you to update and try again? (sorry for the back and forth on dependencies).

— Reply to this email directly or view it on GitHub.

addyosmani commented 8 years ago

@HansS 0.5.4 is a build from March and our tooling has been updated since then. Can you:

HansS commented 8 years ago

Hi Adi,thank you for the message!It works! kind regards¨Hans

Date: Thu, 26 Nov 2015 05:47:36 -0800 From: notifications@github.com To: web-starter-kit@noreply.github.com CC: hans.schenker@windowslive.com Subject: Re: [web-starter-kit] npm test error: Cannot find module 'babel-plugin-transform-es2015-function-name' (#783)

@HansS 0.5.4 is a build from March and our tooling has been updated since then. Can you:

Download 0.6.0-rc.4 from https://github.com/google/web-starter-kit/archive/v0.6.0-rc.4.zip

Install Node 4: https://nodejs.org/ (it's the one on the left). This will ensure you have a more recent version of Node as well as npm 3 installed Install the dependencies for this version using npm install

Once done, you should be able to gulp without running into the issues you experienced.

— Reply to this email directly or view it on GitHub.

addyosmani commented 8 years ago

Awesome! :)

viyoma commented 8 years ago

Run the below commands npm install -g babel-cli npm install --save-dev babel-preset-es2015 npm install --save-dev babel-polyfill grunt serve

HansS commented 8 years ago

After installing: npm i -g babel-cli, i run: babel-cli message:

babel -v The CLI has been moved into the package babel-cli.

protocol of installation process:

npm i -g babel-cli C:\Users\Hans\AppData\Roaming\npm\babel-node -> C:\Users\Hans\AppData\Roaming\npm\node_modules\babel-cli\bin\babel-node.js C:\Users\Hans\AppData\Roaming\npm\babel-doctor -> C:\Users\Hans\AppData\Roaming\npm\node_modules\babel-cli\bin\babel-doctor.js C:\Users\Hans\AppData\Roaming\npm\babel -> C:\Users\Hans\AppData\Roaming\npm\node_modules\babel-cli\bin\babel.js C:\Users\Hans\AppData\Roaming\npm\babel-external-helpers -> C:\Users\Hans\AppData\Roaming\npm\node_modules\babel-cli\bin\babel-external-helpers.js

  • acorn@1.2.2 node_modules\babel-cli\node_modules\acorn
  • ast-types@0.8.16 node_modules\babel-cli\node_modules\ast-types
  • core-js@2.3.0 node_modules\babel-cli\node_modules\babel-polyfill\node_modules\core-js
  • core-js@2.3.0 node_modules\babel-cli\node_modules\babel-register\node_modules\core-js
  • esmangle-evaluator@1.0.0 node_modules\babel-cli\node_modules\esmangle-evaluator
  • esprima@2.7.2 node_modules\babel-cli\node_modules\esprima
  • isarray@0.0.1 node_modules\babel-cli\node_modules\falafel\node_modules\isarray
  • foreach@2.0.5 node_modules\babel-cli\node_modules\foreach
  • object-keys@1.0.9 node_modules\babel-cli\node_modules\object-keys
  • falafel@1.2.0 node_modules\babel-cli\node_modules\falafel
  • pseudomap@1.0.2 node_modules\babel-cli\node_modules\pseudomap
  • recast@0.11.5 node_modules\babel-cli\node_modules\recast
  • isarray@0.0.1 node_modules\babel-cli\node_modules\through2\node_modules\isarray
  • readable-stream@1.0.34 node_modules\babel-cli\node_modules\through2\node_modules\readable-stream
  • through2@0.6.5 node_modules\babel-cli\node_modules\through2
  • inline-process-browser@2.0.1 node_modules\babel-cli\node_modules\inline-process-browser
  • unreachable-branch-transform@0.5.1 node_modules\babel-cli\node_modules\unreachable-branch-transform
  • yallist@2.0.0 node_modules\babel-cli\node_modules\yallist
  • lru-cache@4.0.1 node_modules\babel-cli\node_modules\lru-cache C:\Users\Hans\AppData\Roaming\npm -- babel-cli@6.8.0 +-- babel-core@6.8.0 | +-- babel-code-frame@6.8.0 | +-- babel-generator@6.8.0 | +-- babel-helpers@6.8.0 | +-- babel-messages@6.8.0 | +-- babel-template@6.8.0 | +-- babel-traverse@6.8.0 | |-- invariant@2.2.1 | | -- loose-envify@1.2.0 | +-- babel-types@6.8.1 | +-- babylon@6.8.0 |-- minimatch@2.0.10 | -- brace-expansion@1.1.4 |-- balanced-match@0.4.1 +-- babel-polyfill@6.8.0 | -- core-js@2.4.0 +-- babel-register@6.8.0 +-- babel-runtime@6.6.1 +-- bin-version-check@2.1.0 |-- bin-version@1.0.4 | -- find-versions@1.2.1 |-- meow@3.7.0 | -- object-assign@4.1.0 +-- chokidar@1.5.0 | +-- anymatch@1.3.0 | |-- micromatch@2.3.8 | | +-- braces@1.8.4 | | | -- expand-range@1.8.2 | |-- kind-of@3.0.3 | -- readdirp@2.0.0 | +-- graceful-fs@4.1.4 |-- readable-stream@2.1.2 | -- process-nextick-args@1.0.7 +-- request@2.72.0 | +-- aws4@1.4.1 | +-- http-signature@1.1.1 | |-- sshpk@1.8.3 | | -- getpass@0.1.6 | +-- mime-types@2.1.11 | |-- mime-db@1.23.0 | +-- oauth-sign@0.8.2 | -- tunnel-agent@0.4.3 -- source-map@0.5.6

npm WARN optional Skipping failed optional dependency /babel-cli/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12