Im breaking my head over this, i've been searching for hours and trying everything, from downgrading nuxt to tracking back in my older commits to see what changed.
I get the following build error on AWS codebuild:
> nuxt build
--
165 |
166 | /application/dotoo-web/node_modules/@nuxt/utils/node_modules/consola/dist/shared/consola.4bbae468.cjs:473
167 | if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) {
168 | ^^^
169 |
170 | SyntaxError: Invalid or unexpected token
171 | at Module._compile (internal/modules/cjs/loader.js:723:23)
172 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
173 | at Module.load (internal/modules/cjs/loader.js:653:32)
174 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
175 | at Function.Module._load (internal/modules/cjs/loader.js:585:3)
176 | at Module.require (internal/modules/cjs/loader.js:692:17)
177 | at require (internal/modules/cjs/helpers.js:25:18)
178 | at Object.<anonymous> (/application/dotoo-web/node_modules/@nuxt/utils/node_modules/consola/dist/index.cjs:5:15)
179 | at Module._compile (internal/modules/cjs/loader.js:778:30)
180 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
181 | npm ERR! code ELIFECYCLE
182 | npm ERR! errno 1
183 | npm ERR! [email protected] build: `nuxt build`
184 | npm ERR! Exit status 1
Im using Nuxt 2.17.0 and i'm pushing to a aws codebuild pipeline that was build by a third party for us. It seems it's still on Node 10 according to this line in the build log: Status: Downloaded newer image for node:10-alpine
Does anybody have a clue?
The error message refers to the use of a numeric separator in Node.js, which is not supported in Node versions prior to 12.8.1.
167 | if (codePoint >= 0x3_00 && codePoint <= 0x3_6F) {
0x3_00
here uses a numeric separator _
. Without it, the notation would look like 0x300
.
See https://node.green/#ES2021-features--numeric-separators for the list of Node.js versions that support this feature.
So looks like you need to upgrade node:10-alpine
to at least node:12-alpine
or better node:14-alpine
if 12th doesn't work.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments