Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build in v4.0.1 fails with SyntaxError: Cannot use import statement outside a module #30

Closed
cruftyoldsysadmin opened this issue Jun 9, 2022 · 2 comments

Comments

@cruftyoldsysadmin
Copy link

cruftyoldsysadmin commented Jun 9, 2022

I'm running into this

npm run build

> landkit@2.1.0 build
> del-cli dist && webpack --mode production

/Users/cruftyoldsysadmin/Projects/Personal/stormkit-nomadops/node_modules/.bin/del-cli:2
import meow from 'meow';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Module._load (node:internal/modules/cjs/loader:827:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
node --version
v18.0.0
npm info del-cli

del-cli@4.0.1 | MIT | deps: 2 | versions: 12
Delete files and directories - Cross-platform
https://github.com/sindresorhus/del-cli#readme

keywords: cli-app, cli, delete, del, remove, destroy, trash, unlink, clean, cleaning, cleanup, rm, rmrf, rimraf, rmdir, glob, file, files, folder, directory, fs, filesystem, cross-platform

bin: del, del-cli

dist
.tarball: https://registry.npmjs.org/del-cli/-/del-cli-4.0.1.tgz
.shasum: 2303ccaa45708ee8c6211568344cf87336abf30a
.integrity: sha512-KtR/6cBfZkGDAP2NA7z+bP4p1OMob3wjN9mq13+SWvExx6jT9gFWfLgXEeX8J2B47OKeNCq9yTONmtryQ+m+6g==
.unpackedSize: 3.8 kB

dependencies:
del: ^6.0.0   meow: ^10.1.0 

maintainers:
- sindresorhus <sindresorhus@gmail.com>

dist-tags:
latest: 4.0.1  

published 10 months ago by sindresorhus <sindresorhus@gmail.com>
@Baptiste-Garcin
Copy link

Baptiste-Garcin commented Sep 8, 2022

Same here with node 11.15. I updated node to 12.22.12 and it seems to work

@sindresorhus
Copy link
Owner

This is a problem with Webpack or your Webpack config, not this package.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants