You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyntaxError: Unexpected token '('
at wrapSafe (internal/modules/cjs/loader.js:1117:16)
at Module._compile (internal/modules/cjs/loader.js:1165:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at NodePackageManager.load (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/@parcel/package-manager/lib/index.js:3597:15)
at NodePackageManager.requireSync (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/@parcel/package-manager/lib/index.js:3560:21)
at Module.m.require (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/@parcel/package-manager/lib/index.js:3584:25)
at require (internal/modules/cjs/helpers.js:75:18)
at Object. (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/cosmiconfig/dist/index.js:24:23)
at Module._compile (internal/modules/cjs/loader.js:1201:30)`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Everything works fine at start, but when I try to make a build, this error pops up:
`@parcel/optimizer-htmlnano: Unexpected token '('
/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/cosmiconfig/dist/Explorer.js:75
async #readConfiguration(filepath) {
^
SyntaxError: Unexpected token '('
at wrapSafe (internal/modules/cjs/loader.js:1117:16)
at Module._compile (internal/modules/cjs/loader.js:1165:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at NodePackageManager.load (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/@parcel/package-manager/lib/index.js:3597:15)
at NodePackageManager.requireSync (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/@parcel/package-manager/lib/index.js:3560:21)
at Module.m.require (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/@parcel/package-manager/lib/index.js:3584:25)
at require (internal/modules/cjs/helpers.js:75:18)
at Object. (/Users/dmitrijsilaev/WebstormProjects/yagodka/node_modules/cosmiconfig/dist/index.js:24:23)
at Module._compile (internal/modules/cjs/loader.js:1201:30)`
Here is my package.json:
{ "name": "yagodka", "version": "1.0.0", "description": "", "source": "./src/main.pug", "scripts": { "start": "parcel", "build": "parcel build" }, "author": "", "license": "ISC", "devDependencies": { "@parcel/core": "^2.11.0", "@parcel/optimizer-htmlnano": "^2.11.0", "@parcel/transformer-pug": "^2.11.0", "@parcel/transformer-sass": "^2.11.0", "parcel": "^2.11.0", "pug": "^3.0.2", "sass": "^1.70.0" } }
Here is the structure of the project:
I tried deleting node_modules, parcel_cache, and dist, but it still throws an error. Help please
Beta Was this translation helpful? Give feedback.
All reactions