Git Product home page Git Product logo

Comments (9)

agtabesh avatar agtabesh commented on June 2, 2024 8

I have the same problem. A fresh install tell me there is two vulnerabilities and ask me to run npm audit fix to resolve them. npm audit returns this:

                       === npm audit security report ===                        
                                                                                
# Run  npm install @adonisjs/[email protected]  to resolve 2 vulnerabilities
SEMVER WARNING: Recommended action is a potentially breaking change
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ set-value                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @adonisjs/ace                                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ @adonisjs/ace > enquirer > prompt-question > prompt-choices  │
│               │ > set-value                                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1012                            │
└───────────────┴──────────────────────────────────────────────────────────────┘


┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ set-value                                                    │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ @adonisjs/ace                                                │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ @adonisjs/ace > enquirer > set-value                         │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1012                            │
└───────────────┴──────────────────────────────────────────────────────────────┘

But right after running npm audit fix, any adonis command throw an error like this:

/usr/local/lib/node_modules/@adonisjs/cli/src/Commands/Base/index.js:17
class BaseCommand extends ace.Command {
                              ^

TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (/usr/local/lib/node_modules/@adonisjs/cli/src/Commands/Base/index.js:17:31)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@adonisjs/cli/src/Commands/New/index.js:13:21)
    at Module._compile (internal/modules/cjs/loader.js:689:30)

Package version

@adonisjs/[email protected]

Node.js and npm version

Node.js v10.15.1
Npm v6.10.1

from adonis-cli.

mq003at avatar mq003at commented on June 2, 2024

I also have an error like that

`internal/modules/cjs/loader.js:626
throw err;
^

Error: Cannot find module 'C:\Users\mq003\AppData\Roaming@adonisjs\cli\index.js'
?[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)?[39m
?[90m at Function.Module._load (internal/modules/cjs/loader.js:527:27)?[39m
?[90m at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)?[39m
?[90m at internal/main/run_main_module.js:17:11?[39m {
code: ?[32m'MODULE_NOT_FOUND'?[39m,
requireStack: []
}`

That module exists in my pc. I have imported it back to the directory it was asked for. However, things still don't work.
ảnh

Edit: eventually I found out the solution so I put stackoverflow post here.
Stackoverflow

from adonis-cli.

Secular12 avatar Secular12 commented on June 2, 2024

@agtabesh I ran into the same problem, have you found a fix or a way to revert back? Now I cannot use Adonis at all

from adonis-cli.

thetutlage avatar thetutlage commented on June 2, 2024

Upgrading to a major release of any package and still expect it to work is a false assumption.

Simply use the version 5.0.8 of ace and everything will be fine

from adonis-cli.

mayankgandhi avatar mayankgandhi commented on June 2, 2024

Having the same problem for one of my applications. Are you guys on MacOS Catalina Public Beta by any chance?

from adonis-cli.

thetutlage avatar thetutlage commented on June 2, 2024

@mayankgandhi Did you even read the last comment? You should not upgrade the version of @adonisjs/ace in your app

from adonis-cli.

nklowns avatar nklowns commented on June 2, 2024

Upgrading to a major release of any package and still expect it to work is a false assumption.

Simply use the version 5.0.8 of ace and everything will be fine

Solved by @thetutlage

from adonis-cli.

CristianEchartea avatar CristianEchartea commented on June 2, 2024

Me sucedio el mismo error y era por que habia instalado una version mas reciente, me di cuanta cuando entre a mi package.json especialmente viendo las siguientes lineas dentro de las dependecias:
"@adonisjs/ace": "^6.8.4",
"@adonisjs/lucid": "^7.6.3",

Yo lo resolvi cambiando las versiones por las siguientes:

"@adonisjs/ace": "^5.0.8"
"@adonisjs/lucid": "^6.1.3",

Guarde los cambios y ejecute el siguiente comando en consola:

npm install --production

from adonis-cli.

luccabassoli avatar luccabassoli commented on June 2, 2024

Hello, I need to make cron (task) run my website invoices, but it doesn't work because it can't find the module that would be my file, does anyone know how we can fix it?

from adonis-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.