Skip to content

Incompatible with Yarn 2 #993

Closed
Closed
@araujogui

Description

@araujogui

Describe the bug
Yarn 2.4.1 fails to run Svelte Kit's scripts.

Logs

➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @sveltejs/vite-plugin-svelte@npm:1.0.0-next.6 [6e7b7] doesn't provide rollup (p9cae2), requested by @rollup/pluginutils
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 11s 534ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ vite@npm:2.1.5 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ which@npm:2.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wide-align@npm:1.1.3 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ wrappy@npm:1.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yallist@npm:4.0.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 2s 749ms
➤ YN0000: ┌ Link step
➤ YN0007: │ svelte-preprocess@npm:4.7.0 [2d2f7] must be built because it never did before or the last one failed
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 14s 455ms
(node:5987) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/araujo/Área de trabalho/eurora.store/.yarn/$$virtual/@sveltejs-kit-virtual-6e7b74d398/0/cache/@sveltejs-kit-npm-1.0.0-next.74-7ec168993f-79c42c4576.zip/node_modules/@sveltejs/kit/svelte-kit.js:2
import './dist/cli.js';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:355:18)
    at wrapSafe (node:internal/modules/cjs/loader:1022:15)
    at Module._compile (node:internal/modules/cjs/loader:1056:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.external_module_.Module._load (/home/araujo/Área de trabalho/eurora.store/.pnp.cjs:6480:14)
    at Function.executeUserEntryPoint [as runMain] (node

To Reproduce
https://github.com/araujogui/svelte-kit-yarn

Stacktraces
Information about your SvelteKit Installation:

Diagnostics System: OS: Linux 5.11 Arch Linux CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz Memory: 365.53 MB / 7.65 GB Container: Yes Shell: 3.2.1 - /usr/bin/fish Binaries: Node: 15.14.0 - /usr/bin/node Yarn: 2.4.1 - /usr/bin/yarn npm: 7.9.0 - /usr/bin/npm Browsers: Brave Browser: 89.1.22.71

Severity
It entirely blocks my usage of SvelteKit.

Additional context
There's no issue when NPM or PNPM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions