-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
If you download a REPL with an external dependency, that dependency is conveniently added to the project. Unfortunately, the required dependency sirv-cli
is also overwritten, causing npm run dev
to fail.
Logs
$ npm run dev
> [email protected] dev /svelte-app-1
> rollup -c -w
rollup v1.25.2
bundles src/main.js → public/bundle.js...
LiveReload enabled
created public/bundle.js in 349ms
[2019-10-26 00:00:00] waiting for changes...
> [email protected] start:dev /svelte-app-1
> sirv public --single --dev
sh: sirv: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start:dev: `sirv public --single --dev`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
To Reproduce
- Go to https://svelte.dev/repl/
- Add a line like
import 'leftpad';
to the default<script>
tag - Click the icon for "download zip file"
Expected behavior
Dependencies in package.json
in the downloaded zip should look like this:
"dependencies": {
"sirv-cli": "^0.4.4",
"leftpad": "latest"
}
but actually looks like this:
"dependencies": {
"leftpad": "latest"
}