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

How do you develop the javascript? #147

Closed
mauritsvanrees opened this issue May 3, 2023 · 6 comments
Closed

How do you develop the javascript? #147

mauritsvanrees opened this issue May 3, 2023 · 6 comments

Comments

@mauritsvanrees
Copy link
Member

Which node / npm / yarn version should I use? Would be good to have this documented, or configured in the Volta way.

I ran yarn install (version 3.5.0) and got a modified yarn.lock and untracked files .yarn/ and .yarnrc.yml.

@mauritsvanrees
Copy link
Member Author

With yarn version 1 it seems okay, I get no problems, and no changes after running yarn install && yarn build. Node 16 and 18 seem fine. This Volta config in package.json would help then:

  "volta": {
    "node": "18.16.0",
    "yarn": "1.22.19"
   }

I do see that linting fails:

$ yarn lint
yarn run v1.22.19
$ eslint src
Error: Cannot find module 'escope'
Require stack:
- /Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/api.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at monkeypatch (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/babel-eslint/index.js:41:26)
    at exports.parse (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/babel-eslint/index.js:384:5)
    at parse (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:641:29)
    at Linter._verifyWithoutProcessors (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1111:33)
    at Linter._verifyWithConfigArray (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1255:21)
    at Linter.verify (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1210:25)
    at Linter.verifyAndFix (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/linter/linter.js:1400:29)
    at verifyText (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/cli-engine/cli-engine.js:230:48)
    at CLIEngine.executeOnFiles (/Users/maurits/clients/vmm/formulieren-plone6/checkouts/collective.taxonomy/src/collective/taxonomy/javascripts/node_modules/eslint/lib/cli-engine/cli-engine.js:798:28)
error Command failed with exit code 1.

But yarn start works.

And if I do export NODE_ENV=development and then make run in the top directory, then the "Edit taxonomy data" page uses the javascript from the live yarn server, so that works.

Just trying to get my bearings in this package.

@petschki
Copy link
Member

petschki commented Jul 1, 2024

latest yarn 1.x is used here (1.22.22)

@petschki
Copy link
Member

petschki commented Jul 1, 2024

I've updated the development resources and README to make it a bit simpler. see #160

@mauritsvanrees
Copy link
Member Author

Thanks! Sorry, no time to review until second half of July.

@petschki
Copy link
Member

I've merged #160 ... feel free to open a new issue if there are other problems regarding development.

@mauritsvanrees
Copy link
Member Author

Thanks!

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

2 participants