FredKSchott / create-snowpack-app

The all-in-one app template for Snowpack. [moved]
https://www.snowpack.dev
Other
727 stars 96 forks source link

svelte template `npm test` fails #95

Closed longrunningprocess closed 4 years ago

longrunningprocess commented 4 years ago
npm test                                                                                                      (master|✔)

> @ test ...
> jest

 FAIL  src/App.test.js
  ● Test suite failed to run

    Cannot find module '@babel/preset-env' from '...'

      at Function.resolveSync [as sync] (node_modules/resolve/lib/sync.js:89:15)
      at resolveStandardizedName (node_modules/@babel/core/lib/config/files/plugins.js:101:31)
      at resolvePreset (node_modules/@babel/core/lib/config/files/plugins.js:58:10)
      at loadPreset (node_modules/@babel/core/lib/config/files/plugins.js:77:20)
      at createDescriptor (node_modules/@babel/core/lib/config/config-descriptors.js:154:9)
      at node_modules/@babel/core/lib/config/config-descriptors.js:109:50
          at Array.map (<anonymous>)
      at createDescriptors (node_modules/@babel/core/lib/config/config-descriptors.js:109:29)
      at createPresetDescriptors (node_modules/@babel/core/lib/config/config-descriptors.js:101:10)
      at node_modules/@babel/core/lib/config/config-descriptors.js:58:104

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.325s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

so I npm -i D @babel/preset-env and then it was good, mind adding it to https://github.com/pikapkg/create-snowpack-app/blob/master/templates/app-template-svelte/package.json?

 PASS  src/App.test.js
  ✓ renders learn svelte link (22ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        2.626s
Ran all test suites.
FredKSchott commented 4 years ago

Thanks for filing, our monorepo hides this from us. Fixed in 2d81844