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

frustrated developer: crappy maintained dependencies and doc? #244

Open
dpalic opened this issue Sep 8, 2022 · 2 comments
Open

frustrated developer: crappy maintained dependencies and doc? #244

dpalic opened this issue Sep 8, 2022 · 2 comments

Comments

@dpalic
Copy link

dpalic commented Sep 8, 2022

sorry for this very direct and maybe considered rude issue title
Hope it helps to point to some issue.

I am trying to start to use the generator and all I tried resulted in a failure.

And it is really frustrating if you want to use a component and it is failing in any tried path. AND I tried a lot

first issue

I have tried
#222
without success
or it is failing on different issues like on #242

switching to v10.18.0

It is impossible to generate any code before not switching to at least this version. I tried all version from #222 to the corresponding head LTS like this:

trying Erbium

nvm install lts/erbium
nvm alias default lts/erbium

I can generate the project, but on

gulp failing with same issue like with fermium

Switching to fermium

gulp babel

it is failing on

[19:16:24] Requiring external module @babel/register
ReferenceError: primordials is not defined
    at fs.js:40:5
    at req_ (/tmp/my-new-chrome-extension/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/tmp/my-new-chrome-extension/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js:3:10)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/vinyl-fs/lib/src/getContents/index.js:6:18)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/vinyl-fs/lib/src/index.js:8:19)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/vinyl-fs/index.js:4:8)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/gulp/index.js:7:11)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/gulpfile.babel.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at requireOrImport (/home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/lib/shared/require-or-import.js:19:11)
    at execute (/home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/lib/versioned/^3.7.0/index.js:30:3)
    at Liftoff.handleArguments (/home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/index.js:211:24)
    at Liftoff.execute (/home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/node_modules/liftoff/index.js:201:12)
    at module.exports (/home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/node_modules/flagged-respawn/index.js:51:3)
    at Liftoff.<anonymous> (/home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/node_modules/liftoff/index.js:191:5)
    at /home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/node_modules/liftoff/index.js:149:9
    at /home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/node_modules/v8flags/index.js:145:14
    at /home/xenoadmin/.nvm/versions/node/v14.20.0/lib/node_modules/gulp-cli/node_modules/graceful-fs/graceful-fs.js:61:14
    at FSReqCallback.oncomplete (fs.js:180:23)

or
gulp

[19:18:13] Requiring external module @babel/register
ReferenceError: primordials is not defined
    at fs.js:40:5
    at req_ (/tmp/my-new-chrome-extension/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/tmp/my-new-chrome-extension/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/tmp/my-new-chrome-extension/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module._compile (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:136:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.newLoader [as .js] (/tmp/my-new-chrome-extension/node_modules/pirates/lib/index.js:141:7)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)

my procedure

nvm install lts/erbium
nvm alias default lts/erbium

restart terminal to get new env

npm install --global yo gulp-cli bower
npm install -g [email protected]

# create project
mkdir my-new-chrome-extension && cd $_
yo chrome-extension

gulp
or
gulp babel

if you want to reproduce (only needs 5 mins with good internet connection)
ensure your npm version is removed fully incl. global packages from

nvm alias default lts/fermium
nvm uninstall lts/erbium

restart your terminal

nvm install lts/erbium

so what is a working version configuration to get this project up and running?

@Ivanca
Copy link

Ivanca commented Dec 29, 2022

That solution didn't work but one specified on this SO answer did: https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in-node-js

@roschler
Copy link

roschler commented Feb 6, 2024

Just a tip. If you use the npm method in @Ivanca 's Stack Overflow post with an overrides section in package.json:

"overrides": {
"graceful-fs": "^4.2.11"
}

Make sure you run npm install again to update package-lock.json or you will still get the error.

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